equal
deleted
inserted
replaced
336 * @param epochDay the Epoch Day to convert, based on the epoch 1970-01-01 |
336 * @param epochDay the Epoch Day to convert, based on the epoch 1970-01-01 |
337 * @return the local date, not null |
337 * @return the local date, not null |
338 * @throws DateTimeException if the epoch day exceeds the supported date range |
338 * @throws DateTimeException if the epoch day exceeds the supported date range |
339 */ |
339 */ |
340 public static LocalDate ofEpochDay(long epochDay) { |
340 public static LocalDate ofEpochDay(long epochDay) { |
|
341 EPOCH_DAY.checkValidValue(epochDay); |
341 long zeroDay = epochDay + DAYS_0000_TO_1970; |
342 long zeroDay = epochDay + DAYS_0000_TO_1970; |
342 // find the march-based year |
343 // find the march-based year |
343 zeroDay -= 60; // adjust to 0000-03-01 so leap day is at end of four year cycle |
344 zeroDay -= 60; // adjust to 0000-03-01 so leap day is at end of four year cycle |
344 long adjust = 0; |
345 long adjust = 0; |
345 if (zeroDay < 0) { |
346 if (zeroDay < 0) { |