JulianDate leapSecondDate = getDateForIndex(index); if (date.getDay() == leapSecondDate.getDay()) {
JulianDate lastDate = getDateForIndex(index); JulianDate taiCutoff = new JulianDate(lastDate.getDay(), lastDate.getSecondsOfDay(), TimeStandard.INTERNATIONAL_ATOMIC_TIME); taiCutoff = JulianDate.add(taiCutoff, Duration.fromSeconds(getOffsetForIndex(index)));