本文整理汇总了Java中java.time.chrono.ThaiBuddhistEra类的典型用法代码示例。如果您正苦于以下问题:Java ThaiBuddhistEra类的具体用法?Java ThaiBuddhistEra怎么用?Java ThaiBuddhistEra使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ThaiBuddhistEra类属于java.time.chrono包,在下文中一共展示了ThaiBuddhistEra类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: data_era_epochSecond
import java.time.chrono.ThaiBuddhistEra; //导入依赖的package包/类
@DataProvider(name = "era_epochSecond_dataProvider")
Object[][] data_era_epochSecond() {
return new Object[][] {
{JapaneseChronology.INSTANCE, JapaneseEra.MEIJI, 1873 - YDIFF_MEIJI, 9, 7, 1, 2, 2, OFFSET_P0100},
{JapaneseChronology.INSTANCE, JapaneseEra.SHOWA, 1928 - YDIFF_SHOWA, 2, 28, 1, 2, 2, OFFSET_M0100},
{JapaneseChronology.INSTANCE, JapaneseEra.HEISEI, 1989 - YDIFF_HEISEI, 1, 8, 1, 2, 2, OFFSET_P0100},
{HijrahChronology.INSTANCE, HijrahEra.AH, 1434, 9, 7, 1, 2, 2, OFFSET_P0100},
{MinguoChronology.INSTANCE, MinguoEra.BEFORE_ROC, 1873 - YDIFF_MINGUO, 9, 7, 1, 2, 2, OFFSET_P0100},
{MinguoChronology.INSTANCE, MinguoEra.ROC, 1928 - YDIFF_MINGUO, 2, 28, 1, 2, 2, OFFSET_M0100},
{MinguoChronology.INSTANCE, MinguoEra.ROC, 1989 - YDIFF_MINGUO, 1, 8, 1, 2, 2, OFFSET_P0100},
{ThaiBuddhistChronology.INSTANCE, ThaiBuddhistEra.BE, 1873 + YDIFF_THAIBUDDHIST, 9, 7, 1, 2, 2, OFFSET_P0100},
{ThaiBuddhistChronology.INSTANCE, ThaiBuddhistEra.BE, 1928 + YDIFF_THAIBUDDHIST, 2, 28, 1, 2, 2, OFFSET_M0100},
{ThaiBuddhistChronology.INSTANCE, ThaiBuddhistEra.BE, 1989 + YDIFF_THAIBUDDHIST, 1, 8, 1, 2, 2, OFFSET_P0100},
{IsoChronology.INSTANCE, IsoEra.CE, 1873, 9, 7, 1, 2, 2, OFFSET_P0100},
{IsoChronology.INSTANCE, IsoEra.CE, 1928, 2, 28, 1, 2, 2, OFFSET_M0100},
{IsoChronology.INSTANCE, IsoEra.CE, 1989, 1, 8, 1, 2, 2, OFFSET_P0100},
};
}
示例2: test_ThaiBuddhistChronology_dateYearDay
import java.time.chrono.ThaiBuddhistEra; //导入依赖的package包/类
@Test
public void test_ThaiBuddhistChronology_dateYearDay() {
Chronology chrono = Chronology.of("ThaiBuddhist");
ChronoLocalDate date1 = chrono.dateYearDay(ThaiBuddhistEra.BE, 2459, 60);
ChronoLocalDate date2 = chrono.date(ThaiBuddhistEra.BE, 2459, 2, 29);
assertEquals(date1, ThaiBuddhistChronology.INSTANCE.dateYearDay(ThaiBuddhistEra.BE, 2459, 60));
assertEquals(date2, ThaiBuddhistChronology.INSTANCE.dateYearDay(ThaiBuddhistEra.BE, 2459, 60));
}
示例3: data_of_calendars
import java.time.chrono.ThaiBuddhistEra; //导入依赖的package包/类
@DataProvider(name = "Eras")
Era[][] data_of_calendars() {
return new Era[][] {
{HijrahEra.AH},
{IsoEra.BCE},
{IsoEra.CE},
{MinguoEra.BEFORE_ROC},
{MinguoEra.ROC},
{ThaiBuddhistEra.BEFORE_BE},
{ThaiBuddhistEra.BE},
};
}
示例4: data_samples
import java.time.chrono.ThaiBuddhistEra; //导入依赖的package包/类
@DataProvider(name="samples")
Object[][] data_samples() {
return new Object[][] {
{ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 1), LocalDate.of(1, 1, 1)},
{ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 2), LocalDate.of(1, 1, 2)},
{ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 3), LocalDate.of(1, 1, 3)},
{ThaiBuddhistChronology.INSTANCE.date(2 + YDIFF, 1, 1), LocalDate.of(2, 1, 1)},
{ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 1, 1), LocalDate.of(3, 1, 1)},
{ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 12, 6), LocalDate.of(3, 12, 6)},
{ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 1, 1), LocalDate.of(4, 1, 1)},
{ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 3), LocalDate.of(4, 7, 3)},
{ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 4), LocalDate.of(4, 7, 4)},
{ThaiBuddhistChronology.INSTANCE.date(5 + YDIFF, 1, 1), LocalDate.of(5, 1, 1)},
{ThaiBuddhistChronology.INSTANCE.date(1662 + YDIFF, 3, 3), LocalDate.of(1662, 3, 3)},
{ThaiBuddhistChronology.INSTANCE.date(1728 + YDIFF, 10, 28), LocalDate.of(1728, 10, 28)},
{ThaiBuddhistChronology.INSTANCE.date(1728 + YDIFF, 10, 29), LocalDate.of(1728, 10, 29)},
{ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29), LocalDate.of(2012, 8, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(4 + YDIFF, 60), LocalDate.of(4, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(400 + YDIFF, 60), LocalDate.of(400, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(2000 + YDIFF, 60), LocalDate.of(2000, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(ThaiBuddhistEra.BE, 1916 + YDIFF, 60), LocalDate.of(1916, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(ThaiBuddhistEra.BEFORE_BE, -1907 - YDIFF, 60), LocalDate.of(1908, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(ThaiBuddhistEra.BE, 2000 + YDIFF, 60), LocalDate.of(2000, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.dateYearDay(ThaiBuddhistEra.BE, 2400 + YDIFF, 60), LocalDate.of(2400, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.date(ThaiBuddhistEra.BE, 1916 + YDIFF, 2, 29 ), LocalDate.of(1916, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.date(ThaiBuddhistEra.BEFORE_BE, -1907 - YDIFF, 2, 29), LocalDate.of(1908, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.date(ThaiBuddhistEra.BE, 2000 + YDIFF, 2, 29), LocalDate.of(2000, 2, 29)},
{ThaiBuddhistChronology.INSTANCE.date(ThaiBuddhistEra.BE, 2400 + YDIFF, 2, 29), LocalDate.of(2400, 2, 29)},
};
}
示例5: data_prolepticYear
import java.time.chrono.ThaiBuddhistEra; //导入依赖的package包/类
@DataProvider(name="prolepticYear")
Object[][] data_prolepticYear() {
return new Object[][] {
{1, ThaiBuddhistEra.BE, 4 + YDIFF, 4 + YDIFF, true},
{1, ThaiBuddhistEra.BE, 7 + YDIFF, 7 + YDIFF, false},
{1, ThaiBuddhistEra.BE, 8 + YDIFF, 8 + YDIFF, true},
{1, ThaiBuddhistEra.BE, 1000 + YDIFF, 1000 + YDIFF, false},
{1, ThaiBuddhistEra.BE, 2000 + YDIFF, 2000 + YDIFF, true},
{1, ThaiBuddhistEra.BE, 0, 0, false},
{1, ThaiBuddhistEra.BE, -4 + YDIFF, -4 + YDIFF, true},
{1, ThaiBuddhistEra.BE, -7 + YDIFF, -7 + YDIFF, false},
{1, ThaiBuddhistEra.BE, -100 + YDIFF, -100 + YDIFF, false},
{1, ThaiBuddhistEra.BE, -800 + YDIFF, -800 + YDIFF, true},
{0, ThaiBuddhistEra.BEFORE_BE, -3 - YDIFF, 4 + YDIFF, true},
{0, ThaiBuddhistEra.BEFORE_BE, -6 - YDIFF, 7 + YDIFF, false},
{0, ThaiBuddhistEra.BEFORE_BE, -7 - YDIFF, 8 + YDIFF, true},
{0, ThaiBuddhistEra.BEFORE_BE, -999 - YDIFF, 1000 + YDIFF, false},
{0, ThaiBuddhistEra.BEFORE_BE, -1999 - YDIFF, 2000 + YDIFF, true},
{0, ThaiBuddhistEra.BEFORE_BE, 1, 0, false},
{0, ThaiBuddhistEra.BEFORE_BE, 5 - YDIFF, -4 + YDIFF, true},
{0, ThaiBuddhistEra.BEFORE_BE, 8 - YDIFF, -7 + YDIFF, false},
{0, ThaiBuddhistEra.BEFORE_BE, 101 - YDIFF, -100 + YDIFF, false},
{0, ThaiBuddhistEra.BEFORE_BE, 801 - YDIFF, -800 + YDIFF, true},
};
}
示例6: data_of_eras
import java.time.chrono.ThaiBuddhistEra; //导入依赖的package包/类
@DataProvider(name = "ThaiBuddhistEras")
Object[][] data_of_eras() {
return new Object[][] {
{ThaiBuddhistEra.BEFORE_BE, "BEFORE_BE", 0},
{ThaiBuddhistEra.BE, "BE", 1},
};
}