public int getMinimumValue() { return iChronology.getMinYear(); }
public int getMinimumValue() { return iChronology.getMinYear(); }
public int getMinimumValue() { return iChronology.getMinYear(); }
public int getMinimumValue() { return iChronology.getMinYear(); }
@Override public long setExtended(long instant, int year) { FieldUtils.verifyValueBounds( this, year, iChronology.getMinYear() - 1, iChronology.getMaxYear() + 1); return iChronology.setYear(instant, year); }
public long set(long instant, int year) { FieldUtils.verifyValueBounds (this, year, iChronology.getMinYear(), iChronology.getMaxYear()); return iChronology.setYear(instant, year); }
public long set(long instant, int year) { FieldUtils.verifyValueBounds (this, year, iChronology.getMinYear(), iChronology.getMaxYear()); return iChronology.setYear(instant, year); }
@Override public long setExtended(long instant, int year) { FieldUtils.verifyValueBounds( this, year, iChronology.getMinYear() - 1, iChronology.getMaxYear() + 1); return iChronology.setYear(instant, year); }
public long addWrapField(long instant, int years) { if (years == 0) { return instant; } // Return newly calculated millis value int thisYear = iChronology.getYear(instant); int wrappedYear = FieldUtils.getWrappedValue (thisYear, years, iChronology.getMinYear(), iChronology.getMaxYear()); return set(instant, wrappedYear); }
public long addWrapField(long instant, int years) { if (years == 0) { return instant; } // Return newly calculated millis value int thisYear = iChronology.getYear(instant); int wrappedYear = FieldUtils.getWrappedValue (thisYear, years, iChronology.getMinYear(), iChronology.getMaxYear()); return set(instant, wrappedYear); }
/** * Gets the milliseconds for a date at midnight. * * @param year the year * @param monthOfYear the month * @param dayOfMonth the day * @return the milliseconds */ long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) { FieldUtils.verifyValueBounds(DateTimeFieldType.year(), year, getMinYear() - 1, getMaxYear() + 1); FieldUtils.verifyValueBounds(DateTimeFieldType.monthOfYear(), monthOfYear, 1, getMaxMonth(year)); FieldUtils.verifyValueBounds(DateTimeFieldType.dayOfMonth(), dayOfMonth, 1, getDaysInYearMonth(year, monthOfYear)); long instant = getYearMonthDayMillis(year, monthOfYear, dayOfMonth); // check for limit caused by min/max year +1/-1 if (instant < 0 && year == getMaxYear() + 1) { return Long.MAX_VALUE; } else if (instant > 0 && year == getMinYear() - 1) { return Long.MIN_VALUE; } return instant; }
/** * Gets the milliseconds for a date at midnight. * * @param year the year * @param monthOfYear the month * @param dayOfMonth the day * @return the milliseconds */ long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) { FieldUtils.verifyValueBounds(DateTimeFieldType.year(), year, getMinYear() - 1, getMaxYear() + 1); FieldUtils.verifyValueBounds(DateTimeFieldType.monthOfYear(), monthOfYear, 1, getMaxMonth(year)); FieldUtils.verifyValueBounds(DateTimeFieldType.dayOfMonth(), dayOfMonth, 1, getDaysInYearMonth(year, monthOfYear)); long instant = getYearMonthDayMillis(year, monthOfYear, dayOfMonth); // check for limit caused by min/max year +1/-1 if (instant < 0 && year == getMaxYear() + 1) { return Long.MAX_VALUE; } else if (instant > 0 && year == getMinYear() - 1) { return Long.MIN_VALUE; } return instant; }
if (yearToUse < iChronology.getMinYear() || yearToUse > iChronology.getMaxYear()) {
if (yearToUse < iChronology.getMinYear() || yearToUse > iChronology.getMaxYear()) {
public int getMinimumValue() { return iChronology.getMinYear(); }
iChronology.getMinYear(), iChronology.getMaxYear());
iChronology.getMinYear(), iChronology.getMaxYear());
public long set(long instant, int year) { FieldUtils.verifyValueBounds (this, year, iChronology.getMinYear(), iChronology.getMaxYear()); return iChronology.setYear(instant, year); }
public long addWrapField(long instant, int years) { if (years == 0) { return instant; } // Return newly calculated millis value int thisYear = iChronology.getYear(instant); int wrappedYear = FieldUtils.getWrappedValue (thisYear, years, iChronology.getMinYear(), iChronology.getMaxYear()); return set(instant, wrappedYear); }
/** * Gets the milliseconds for a date at midnight. * * @param year the year * @param monthOfYear the month * @param dayOfMonth the day * @return the milliseconds */ long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) { FieldUtils.verifyValueBounds(DateTimeFieldType.year(), year, getMinYear(), getMaxYear()); FieldUtils.verifyValueBounds(DateTimeFieldType.monthOfYear(), monthOfYear, 1, getMaxMonth(year)); FieldUtils.verifyValueBounds(DateTimeFieldType.dayOfMonth(), dayOfMonth, 1, getDaysInYearMonth(year, monthOfYear)); return getYearMonthDayMillis(year, monthOfYear, dayOfMonth); }