From a6759c3d059e94cd42a3e3dad76aca38bc53502d Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Mar 2017 13:14:04 +0100 Subject: [PATCH] fixed files form Time #18 --- .../Time/18/org/joda/time/chrono/GJChronology.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/Time/18/org/joda/time/chrono/GJChronology.java b/projects/Time/18/org/joda/time/chrono/GJChronology.java index 29e559d..0a19aa6 100644 --- a/projects/Time/18/org/joda/time/chrono/GJChronology.java +++ b/projects/Time/18/org/joda/time/chrono/GJChronology.java @@ -361,9 +361,21 @@ public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, // Assume date is Gregorian. long instant; + try { instant = iGregorianChronology.getDateTimeMillis (year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour, secondOfMinute, millisOfSecond); + } catch (IllegalFieldValueException ex) { + if (monthOfYear != 2 || dayOfMonth != 29) { + throw ex; + } + instant = iGregorianChronology.getDateTimeMillis + (year, monthOfYear, 28, + hourOfDay, minuteOfHour, secondOfMinute, millisOfSecond); + if (instant >= iCutoverMillis) { + throw ex; + } + } if (instant < iCutoverMillis) { // Maybe it's Julian. instant = iJulianChronology.getDateTimeMillis