use of org.joda.time.Chronology in project joda-time by JodaOrg.
the class TestEthiopicChronology method testLeap_5_13.
public void testLeap_5_13() {
Chronology chrono = EthiopicChronology.getInstance();
DateTime dt = new DateTime(3, 13, 5, 0, 0, chrono);
assertEquals(true, dt.year().isLeap());
assertEquals(true, dt.monthOfYear().isLeap());
assertEquals(false, dt.dayOfMonth().isLeap());
assertEquals(false, dt.dayOfYear().isLeap());
}
use of org.joda.time.Chronology in project joda-time by JodaOrg.
the class TestGregorianChronology method testLeap_29feb.
public void testLeap_29feb() {
Chronology chrono = GregorianChronology.getInstance();
DateTime dt = new DateTime(2012, 2, 29, 0, 0, chrono);
assertEquals(true, dt.year().isLeap());
assertEquals(true, dt.monthOfYear().isLeap());
assertEquals(true, dt.dayOfMonth().isLeap());
assertEquals(true, dt.dayOfYear().isLeap());
}
use of org.joda.time.Chronology in project joda-time by JodaOrg.
the class TestGregorianChronology method testMaximumValue.
public void testMaximumValue() {
YearMonthDay ymd1 = new YearMonthDay(1999, DateTimeConstants.FEBRUARY, 1);
DateMidnight dm1 = new DateMidnight(1999, DateTimeConstants.FEBRUARY, 1);
Chronology chrono = GregorianChronology.getInstance();
assertEquals(28, chrono.dayOfMonth().getMaximumValue(ymd1));
assertEquals(28, chrono.dayOfMonth().getMaximumValue(dm1.getMillis()));
}
use of org.joda.time.Chronology in project joda-time by JodaOrg.
the class TestEthiopicChronology method testLeap_6_13.
public void testLeap_6_13() {
Chronology chrono = EthiopicChronology.getInstance();
DateTime dt = new DateTime(3, 13, 6, 0, 0, chrono);
assertEquals(true, dt.year().isLeap());
assertEquals(true, dt.monthOfYear().isLeap());
assertEquals(true, dt.dayOfMonth().isLeap());
assertEquals(true, dt.dayOfYear().isLeap());
}
use of org.joda.time.Chronology in project joda-time by JodaOrg.
the class TestGJChronology method testLeap_28feb.
public void testLeap_28feb() {
Chronology chrono = GJChronology.getInstance();
DateTime dt = new DateTime(2012, 2, 28, 0, 0, chrono);
assertEquals(true, dt.year().isLeap());
assertEquals(true, dt.monthOfYear().isLeap());
assertEquals(false, dt.dayOfMonth().isLeap());
assertEquals(false, dt.dayOfYear().isLeap());
}
Aggregations