/** * Tests the method which reports whether the indicated Julian Day Number is a day which contains a leap second. */ @Test public final void testDoesDayHaveLeapSecond() { LeapSeconds leapSeconds = new LeapSeconds(); Assert.assertTrue(leapSeconds.doesDayHaveLeapSecond(2443509)); Assert.assertFalse(leapSeconds.doesDayHaveLeapSecond(2443510)); }
boolean dayHasLeapSecond = LeapSeconds.getInstance().doesDayHaveLeapSecond(new YearMonthDay(year, month, day).getJulianDayNumber()); return dayHasLeapSecond && hour == 23 && minute == 59;