protected void assemble(Fields fields) { if (getBase().getZone() == DateTimeZone.UTC) { // Use zero based century and year of century. fields.centuryOfEra = new DividedDateTimeField( ISOYearOfEraDateTimeField.INSTANCE, DateTimeFieldType.centuryOfEra(), 100); fields.yearOfCentury = new RemainderDateTimeField( (DividedDateTimeField) fields.centuryOfEra, DateTimeFieldType.yearOfCentury()); fields.weekyearOfCentury = new RemainderDateTimeField( (DividedDateTimeField) fields.centuryOfEra, DateTimeFieldType.weekyearOfCentury()); fields.centuries = fields.centuryOfEra.getDurationField(); } }
protected void assemble(Fields fields) { if (getBase().getZone() == DateTimeZone.UTC) { // Use zero based century and year of century. fields.centuryOfEra = new DividedDateTimeField( ISOYearOfEraDateTimeField.INSTANCE, DateTimeFieldType.centuryOfEra(), 100); fields.centuries = fields.centuryOfEra.getDurationField(); fields.yearOfCentury = new RemainderDateTimeField( (DividedDateTimeField) fields.centuryOfEra, DateTimeFieldType.yearOfCentury()); fields.weekyearOfCentury = new RemainderDateTimeField( (DividedDateTimeField) fields.centuryOfEra, fields.weekyears, DateTimeFieldType.weekyearOfCentury()); } }
@Override public DateTimeField getField(Chronology chronology) { return new OffsetDateTimeField(new DividedDateTimeField(new OffsetDateTimeField(chronology.monthOfYear(), -1), QuarterOfYear, 3), 1); }
@Override public DateTimeField getField(Chronology chronology) { return new OffsetDateTimeField(new DividedDateTimeField(new OffsetDateTimeField(chronology.monthOfYear(), -1), QUARTER_OF_YEAR, 3), 1); }
public DateTimeField getField(Chronology chronology) { return new OffsetDateTimeField(new DividedDateTimeField(new OffsetDateTimeField(chronology.monthOfYear(), -1), QuarterOfYear, 3), 1); }
public DateTimeField getField(Chronology chronology) { return new OffsetDateTimeField(new DividedDateTimeField(new OffsetDateTimeField(chronology.monthOfYear(), -1), HalfYearOfYear, 6), 1); }
public DateTimeField getField(Chronology chronology) { return new DividedDateTimeField(chronology.yearOfCentury(), DecadeOfCentury, 10); }
public DateTimeField getField(Chronology chronology) { return new DividedDateTimeField(chronology.yearOfCentury(), YearOfDecade, 10); }