APISonar


java.time.chrono.ThaiBuddhistChronology.INSTANCE.date

> java > time > chrono > ThaiBuddhistChronology > INSTANCE > date
java APIs time APIs chrono APIs ThaiBuddhistChronology APIs INSTANCE APIs date APIs

Example 1
public void test_adjust2() {
        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 12, 2);
        ThaiBuddhistDate test = base.with(TemporalAdjusters.lastDayOfMonth());
        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 12, 31));
    }
Example 2
public void test_fromCalendrical(ThaiBuddhistDate jdate, LocalDate iso) {
        assertEquals(ThaiBuddhistChronology.INSTANCE.date(iso), jdate);
        assertEquals(ThaiBuddhistDate.from(iso), jdate);
    }
Example 3
public void test_subtractFrom_wrongChrono(Chronology chrono) {
        ChronoPeriod period = chrono.period(1, 2, 3);
        ChronoLocalDate isoDate = LocalDate.of(2000, 1, 1);
        ChronoLocalDate thaiDate = ThaiBuddhistChronology.INSTANCE.date(2000, 1, 1);
        // one of these two will fail
        period.subtractFrom(isoDate);
        period.subtractFrom(thaiDate);
    }
Example 4
public void test_periodUntilDiffChrono() {
        MinguoDate mdate1 = MinguoDate.of(1970, 1, 1);
        MinguoDate mdate2 = MinguoDate.of(1971, 2, 2);
        ThaiBuddhistDate ldate2 = ThaiBuddhistChronology.INSTANCE.date(mdate2);
        ChronoPeriod period = mdate1.until(ldate2);
        assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1));
    }
Example 5
public void test_LocalDate_adjustToBuddhistDate() {
        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29);
        LocalDate test = LocalDate.MIN.with(jdate);
        assertEquals(test, LocalDate.of(2012, 10, 29));
    }