/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return super.hashCode() * 13 + getLeapYearPatternType().hashCode(); }
long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) throws IllegalArgumentException { return super.getDateMidnightMillis(adjustYearForSet(year), monthOfYear, dayOfMonth); }
static Chronology getLenientISOChronology() { if (cLenientISO == null) { cLenientISO = LenientChronology.getInstance(ISOChronology.getInstanceUTC()); } return cLenientISO; }
public int getMaximumValue(ReadablePartial partial) { long instant = GJChronology.getInstanceUTC().set(partial, 0L); return getMaximumValue(instant); }
protected void assemble(Fields fields) { if (getBase() == null) { super.assemble(fields); fields.era = ERA_FIELD; fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 12); fields.months = fields.monthOfYear.getDurationField(); } }
private YearInfo getYearInfo(int year) { YearInfo info = iYearInfoCache[year & CACHE_MASK]; if (info == null || info.iYear != year) { info = new YearInfo(year, calculateFirstDayOfYearMillis(year)); iYearInfoCache[year & CACHE_MASK] = info; } return info; }
public int getLeapAmount(long instant) { if (iChronology.isLeapYear(get(instant))) { return 1; } else { return 0; } }
public long roundCeiling(long instant) { int year = get(instant); long yearStartMillis = iChronology.getYearMillis(year); if (instant != yearStartMillis) { // Bump up to start of next year. instant = iChronology.getYearMillis(year + 1); } return instant; }
protected int getMaximumValueForSet(long instant, int value) { int maxLessOne = iChronology.getDaysInYearMax() - 1; return (value > maxLessOne || value < 1) ? getMaximumValue(instant) : maxLessOne; }
static Chronology getLenientISOChronology() { if (cLenientISO == null) { cLenientISO = LenientChronology.getInstance(ISOChronology.getInstanceUTC()); } return cLenientISO; }
/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return super.hashCode() * 13 + getLeapYearPatternType().hashCode(); }
long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) throws IllegalArgumentException { return super.getDateMidnightMillis(adjustYearForSet(year), monthOfYear, dayOfMonth); }
private YearInfo getYearInfo(int year) { YearInfo info = iYearInfoCache[year & CACHE_MASK]; if (info == null || info.iYear != year) { info = new YearInfo(year, calculateFirstDayOfYearMillis(year)); iYearInfoCache[year & CACHE_MASK] = info; } return info; }
public int getLeapAmount(long instant) { if (iChronology.isLeapYear(get(instant))) { return 1; } else { return 0; } }
public long roundCeiling(long instant) { int year = get(instant); long yearStartMillis = iChronology.getYearMillis(year); if (instant != yearStartMillis) { // Bump up to start of next year. instant = iChronology.getYearMillis(year + 1); } return instant; }