code: public void validateModifiedJulianDay(long mjDay, long nanoOfDay) {
          long leapSecs = getLeapSecondAdjustment(mjDay);
          long maxNanos = (SECS_PER_DAY + leapSecs) * NANOS_PER_SECOND;
          if (nanoOfDay < 0 || nanoOfDay >= maxNanos) {
              throw new DateTimeException("Nanosecond-of-day must be between 0 and " + maxNanos + " on date " + mjDay);
          }
      }
docs: Validates combination of Modified Julian Day and nanosecond-of-day.
  <p>
  Modified Julian Day is a simple incrementing count of days where day 0 is 1858-11-17.
  Nanosecond-of-day is a simple count of nanoseconds from the start of the day
  including any additional leap-second.
  This method validates the nanosecond-of-day value against the Modified Julian Day.
  <p>
  The nanosecond-of-day value has a valid range from {@code 0} to
  {@code 86,400,000,000,000 - 1} on most days, and a larger or smaller range
  on leap-second days.
  
  @param mjDay  the date as a Modified Julian Day (number of days from the epoch of 1858-11-17)
  @param nanoOfDay  the nanoseconds within the day, including leap seconds
  @throws DateTimeException if nanoOfDay is out of range