public long roundFloor(long instant) { if (get(instant) == DateTimeConstants.CE) { return iChronology.setYear(0, 1); } else { return Long.MIN_VALUE; } }
public long roundCeiling(long instant) { if (get(instant) == DateTimeConstants.BCE) { return iChronology.setYear(0, 1); } else { return Long.MAX_VALUE; } }
public long roundFloor(long instant) { if (get(instant) == DateTimeConstants.CE) { return iChronology.setYear(0, 1); } else { return Long.MIN_VALUE; } }
public long roundCeiling(long instant) { if (get(instant) == DateTimeConstants.BCE) { return iChronology.setYear(0, 1); } else { return Long.MAX_VALUE; } }
@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); }
/** * Set the Era component of the specified time instant. * * @param instant the time instant in millis to update. * @param era the era to update the time to. * @return the updated time instant. * @throws IllegalArgumentException if era is invalid. */ public long set(long instant, int era) { FieldUtils.verifyValueBounds(this, era, DateTimeConstants.BCE, DateTimeConstants.CE); int oldEra = get(instant); if (oldEra != era) { int year = iChronology.getYear(instant); return iChronology.setYear(instant, -year); } else { return instant; } }
/** * Set the Era component of the specified time instant. * * @param instant the time instant in millis to update. * @param era the era to update the time to. * @return the updated time instant. * @throws IllegalArgumentException if era is invalid. */ public long set(long instant, int era) { FieldUtils.verifyValueBounds(this, era, DateTimeConstants.BCE, DateTimeConstants.CE); int oldEra = get(instant); if (oldEra != era) { int year = iChronology.getYear(instant); return iChronology.setYear(instant, -year); } else { return instant; } }
workInstant = iChronology.setYear( workInstant, year );
workInstant = iChronology.setYear( workInstant, year );
public long roundFloor(long instant) { if (get(instant) == DateTimeConstants.CE) { return iChronology.setYear(0, 1); } else { return Long.MIN_VALUE; } }
public long roundCeiling(long instant) { if (get(instant) == DateTimeConstants.BCE) { return iChronology.setYear(0, 1); } else { return Long.MAX_VALUE; } }
public long set(long instant, int year) { FieldUtils.verifyValueBounds (this, year, iChronology.getMinYear(), iChronology.getMaxYear()); return iChronology.setYear(instant, year); }
/** * Set the Era component of the specified time instant. * * @param instant the time instant in millis to update. * @param era the era to update the time to. * @return the updated time instant. * @throws IllegalArgumentException if era is invalid. */ public long set(long instant, int era) { FieldUtils.verifyValueBounds(this, era, DateTimeConstants.BCE, DateTimeConstants.CE); int oldEra = get(instant); if (oldEra != era) { int year = iChronology.getYear(instant); return iChronology.setYear(instant, -year); } else { return instant; } }
workInstant = iChronology.setYear( workInstant, year );
public long roundFloor(long instant) { if (get(instant) == DateTimeConstants.CE) { return iChronology.setYear(0, 1); } else { return Long.MIN_VALUE; } }
public long roundCeiling(long instant) { if (get(instant) == DateTimeConstants.BCE) { return iChronology.setYear(0, 1); } else { return Long.MAX_VALUE; } }
public long set(long instant, int year) { FieldUtils.verifyValueBounds (this, year, iChronology.getMinYear(), iChronology.getMaxYear()); return iChronology.setYear(instant, year); }