@Override public D withValue(D context, Long value, boolean lenient) { long utcDays = MathUtils.safeSubtract( EpochDays.UNIX.transform(value.longValue(), this.element), UTC_OFFSET); return this.calsys.transform(utcDays); }
@Override public boolean isValid(D context, Long value) { long days = MathUtils.safeSubtract( EpochDays.UNIX.transform(value.longValue(), this.element), UTC_OFFSET); return ((days <= this.calsys.getMaximumSinceUTC()) && (days >= this.calsys.getMinimumSinceUTC())); }