Skip to content

Commit

Permalink
fixed files form Time #10
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 5fe1921 commit d122b03
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public abstract class BaseSingleFieldPeriod
/** Serialization version. */
private static final long serialVersionUID = 9386874258972L;
/** The start of 1972. */
private static final long START_1972 = 2L * 365L * 86400L * 1000L;

/** The period in the units of this period. */
private volatile int iPeriod;
Expand Down Expand Up @@ -101,7 +102,7 @@ protected static int between(ReadablePartial start, ReadablePartial end, Readabl
throw new IllegalArgumentException("ReadablePartial objects must be contiguous");
}
Chronology chrono = DateTimeUtils.getChronology(start.getChronology()).withUTC();
int[] values = chrono.get(zeroInstance, chrono.set(start, 0L), chrono.set(end, 0L));
int[] values = chrono.get(zeroInstance, chrono.set(start, START_1972), chrono.set(end, START_1972));
return values[0];
}

Expand Down

0 comments on commit d122b03

Please sign in to comment.