Skip to content

Commit

Permalink
fixed files form Time #18
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 3476cde commit a6759c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions projects/Time/18/org/joda/time/chrono/GJChronology.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a6759c3

Please sign in to comment.