public long roundCeiling(long instant) { return iField.roundCeiling(instant); }
public long roundCeiling(long instant) { if (instant >= iCutover) { instant = iGregorianField.roundCeiling(instant); } else { instant = iJulianField.roundCeiling(instant); if (instant >= iCutover) { // Only adjust if gap fully crossed. if (instant - iGapDuration >= iCutover) { instant = julianToGregorian(instant); } } } return instant; }
/** * Rounds to the highest whole unit of this field on a copy of this DateTime. * * @return a copy of the DateTime with the field value changed */ public DateTime roundCeilingCopy() { return iInstant.withMillis(iField.roundCeiling(iInstant.getMillis())); }
/** * Rounds to the highest whole unit of this field on a copy of this DateTime. * * @return a copy of the DateTime with the field value changed */ public DateTime roundCeilingCopy() { return iInstant.withMillis(iField.roundCeiling(iInstant.getMillis())); }
public long roundCeiling(long instant) { return getWrappedField().roundCeiling(instant); }
public long roundCeiling(long instant) { return getWrappedField().roundCeiling(instant); }
public long roundCeiling(long instant) { return getWrappedField().roundCeiling(instant); }
public long roundCeiling(long instant) { return getWrappedField().roundCeiling(instant); }
public long roundCeiling(long instant) { if (iTimeField) { int offset = getOffsetToAdd(instant); instant = iField.roundCeiling(instant + offset); return instant - offset; } else { long localInstant = iZone.convertUTCToLocal(instant); localInstant = iField.roundCeiling(localInstant); return iZone.convertLocalToUTC(localInstant, false, instant); } }
public long roundCeiling(long instant) { if (iTimeField) { int offset = getOffsetToAdd(instant); instant = iField.roundCeiling(instant + offset); return instant - offset; } else { long localInstant = iZone.convertUTCToLocal(instant); localInstant = iField.roundCeiling(localInstant); return iZone.convertLocalToUTC(localInstant, false, instant); } }
/** * Rounds to the highest whole unit of this field on a copy of this DateMidnight. * * @return a copy of the DateMidnight with the field value changed */ public DateMidnight roundCeilingCopy() { return iInstant.withMillis(iField.roundCeiling(iInstant.getMillis())); }
/** * Rounds to the highest whole unit of this field on a copy of this * LocalTime. * <p> * For example, rounding floor on the hourOfDay field of a LocalTime * where the time is 10:30 would result in new LocalTime with the * time of 11:00. * * @return a copy of the LocalTime with the field value changed */ public LocalTime roundCeilingCopy() { return iInstant.withLocalMillis(iField.roundCeiling(iInstant.getLocalMillis())); }
/** * Rounds to the highest whole unit of this field on a copy of this * LocalDate. * <p> * For example, rounding floor on the hourOfDay field of a LocalDate * where the time is 10:30 would result in new LocalDate with the * time of 11:00. * * @return a copy of the LocalDate with the field value changed */ public LocalDate roundCeilingCopy() { return iInstant.withLocalMillis(iField.roundCeiling(iInstant.getLocalMillis())); }
/** * Rounds to the highest whole unit of this field on a copy of this * LocalDateTime. * <p> * For example, rounding floor on the hourOfDay field of a LocalDateTime * where the time is 10:30 would result in new LocalDateTime with the * time of 11:00. * * @return a copy of the LocalDateTime with the field value changed */ public LocalDateTime roundCeilingCopy() { return iInstant.withLocalMillis(iField.roundCeiling(iInstant.getLocalMillis())); }
/** * Rounds to the highest whole unit of this field on a copy of this DateMidnight. * * @return a copy of the DateMidnight with the field value changed */ public DateMidnight roundCeilingCopy() { return iInstant.withMillis(iField.roundCeiling(iInstant.getMillis())); }
/** * Rounds to the highest whole unit of this field on a copy of this * LocalDateTime. * <p> * For example, rounding floor on the hourOfDay field of a LocalDateTime * where the time is 10:30 would result in new LocalDateTime with the * time of 11:00. * * @return a copy of the LocalDateTime with the field value changed */ public LocalDateTime roundCeilingCopy() { return iInstant.withLocalMillis(iField.roundCeiling(iInstant.getLocalMillis())); }
public long roundCeiling(long instant) { checkLimits(instant, null); long result = getWrappedField().roundCeiling(instant); checkLimits(result, "resulting"); return result; }
/** * Round to the highest whole unit of this field. * * @return the mutable datetime being used, so calls can be chained * @see DateTimeField#roundCeiling */ public MutableDateTime roundCeiling() { iInstant.setMillis(getField().roundCeiling(iInstant.getMillis())); return iInstant; }
public long roundCeiling(long instant) { checkLimits(instant, null); long result = getWrappedField().roundCeiling(instant); checkLimits(result, "resulting"); return result; }
/** * Round to the highest whole unit of this field. * * @return the mutable datetime being used, so calls can be chained * @see DateTimeField#roundCeiling */ public MutableDateTime roundCeiling() { iInstant.setMillis(getField().roundCeiling(iInstant.getMillis())); return iInstant; }