millis += SKIP;
}
}
public void testSampleDate1() {
DateTime dt = new DateTime(1945, 11, 12, 0, 0, 0, 0, ISO_UTC);
dt = dt.withChronology(ISLAMIC_UTC);
assertEquals(IslamicChronology.AH, dt.getEra());
assertEquals(14, dt.getCenturyOfEra()); // TODO confirm
assertEquals(64, dt.getYearOfCentury());
assertEquals(1364, dt.getYearOfEra());
assertEquals(1364, dt.getYear());
Property fld = dt.year();
assertEquals(false, fld.isLeap());
assertEquals(0, fld.getLeapAmount());
assertEquals(DurationFieldType.days(), fld.getLeapDurationField().getType());
assertEquals(new DateTime(1365, 12, 6, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
assertEquals(12, dt.getMonthOfYear());
fld = dt.monthOfYear();
assertEquals(false, fld.isLeap());
assertEquals(0, fld.getLeapAmount());
assertEquals(DurationFieldType.days(), fld.getLeapDurationField().getType());
assertEquals(1, fld.getMinimumValue());
assertEquals(1, fld.getMinimumValueOverall());
assertEquals(12, fld.getMaximumValue());
assertEquals(12, fld.getMaximumValueOverall());
assertEquals(new DateTime(1365, 1, 6, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
assertEquals(new DateTime(1364, 1, 6, 0, 0, 0, 0, ISLAMIC_UTC), fld.addWrapFieldToCopy(1));
assertEquals(6, dt.getDayOfMonth());
fld = dt.dayOfMonth();
assertEquals(false, fld.isLeap());
assertEquals(0, fld.getLeapAmount());
assertEquals(null, fld.getLeapDurationField());
assertEquals(1, fld.getMinimumValue());
assertEquals(1, fld.getMinimumValueOverall());
assertEquals(29, fld.getMaximumValue());
assertEquals(30, fld.getMaximumValueOverall());
assertEquals(new DateTime(1364, 12, 7, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
assertEquals(DateTimeConstants.MONDAY, dt.getDayOfWeek());
fld = dt.dayOfWeek();
assertEquals(false, fld.isLeap());
assertEquals(0, fld.getLeapAmount());
assertEquals(null, fld.getLeapDurationField());
assertEquals(1, fld.getMinimumValue());
assertEquals(1, fld.getMinimumValueOverall());
assertEquals(7, fld.getMaximumValue());
assertEquals(7, fld.getMaximumValueOverall());
assertEquals(new DateTime(1364, 12, 7, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
assertEquals(6 * 30 + 5 * 29 + 6, dt.getDayOfYear());
fld = dt.dayOfYear();
assertEquals(false, fld.isLeap());
assertEquals(0, fld.getLeapAmount());
assertEquals(null, fld.getLeapDurationField());
assertEquals(1, fld.getMinimumValue());
assertEquals(1, fld.getMinimumValueOverall());
assertEquals(354, fld.getMaximumValue());
assertEquals(355, fld.getMaximumValueOverall());
assertEquals(new DateTime(1364, 12, 7, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
assertEquals(0, dt.getHourOfDay());
assertEquals(0, dt.getMinuteOfHour());
assertEquals(0, dt.getSecondOfMinute());
assertEquals(0, dt.getMillisOfSecond());
}