Java Code Examples for java.time.chrono.ThaiBuddhistDate#of()
The following examples show how to use
java.time.chrono.ThaiBuddhistDate#of() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TCKMinguoChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="zonedDateTime") Object[][] data_zonedDateTime() { return new Object[][] { {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class}, {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, }; }
Example 2
Source File: TCKMinguoChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="zonedDateTime") Object[][] data_zonedDateTime() { return new Object[][] { {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class}, {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, }; }
Example 3
Source File: TestUmmAlQuraChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="localDateTime") Object[][] data_localDateTime() { return new Object[][] { {LocalDateTime.of(2012, 2, 29, 2, 7), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7), null}, {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_RIYADH), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7, 1, 1), null}, {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7, 1, 1), null}, {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, }; }
Example 4
Source File: TCKThaiBuddhistChronology.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilDiffChrono() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); ChronoPeriod period = mdate1.until(ldate2); assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); }
Example 5
Source File: TCKThaiBuddhistChronology.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilUnit() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); long months = mdate1.until(mdate2, ChronoUnit.MONTHS); assertEquals(months, 13); }
Example 6
Source File: TCKThaiBuddhistChronology.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilUnit() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); long months = mdate1.until(mdate2, ChronoUnit.MONTHS); assertEquals(months, 13); }
Example 7
Source File: TestUmmAlQuraChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="zonedDateTime") Object[][] data_zonedDateTime() { return new Object[][] { {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_RIYADH), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7, 1, 1), null}, {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7, 1, 1), null}, {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class}, {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, }; }
Example 8
Source File: TCKMinguoChronology.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="zonedDateTime") Object[][] data_zonedDateTime() { return new Object[][] { {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class}, {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, }; }
Example 9
Source File: TestUmmAlQuraChronology.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="zonedDateTime") Object[][] data_zonedDateTime() { return new Object[][] { {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_RIYADH), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7, 1, 1), null}, {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), HijrahChronology.INSTANCE.date(1433, 4, 7), LocalTime.of(2, 7, 1, 1), null}, {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class}, {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, }; }
Example 10
Source File: TCKThaiBuddhistChronology.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilUnit() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); long months = mdate1.until(mdate2, ChronoUnit.MONTHS); assertEquals(months, 13); }
Example 11
Source File: TCKChronoLocalDateSerialization.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Object[][] data_of_calendars() { return new Object[][]{ {JapaneseDate.of(JapaneseEra.HEISEI, 25, 01, 05), JAPANESE_DATE_TYPE}, {MinguoDate.of(102, 01, 05), MINGUO_DATE_TYPE}, {ThaiBuddhistDate.of(2556, 01, 05), THAIBUDDHIST_DATE_TYPE}, }; }
Example 12
Source File: TCKChronoLocalDateSerialization.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Object[][] data_of_calendars() { return new Object[][]{ {JapaneseDate.of(JapaneseEra.HEISEI, 25, 01, 05), JAPANESE_DATE_TYPE}, {MinguoDate.of(102, 01, 05), MINGUO_DATE_TYPE}, {ThaiBuddhistDate.of(2556, 01, 05), THAIBUDDHIST_DATE_TYPE}, }; }
Example 13
Source File: TestUmmAlQuraChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="hijrahToThai") Object[][] data_hijrahToThai() { return new Object[][] { {HijrahDate.of(1350,5,15), ThaiBuddhistDate.of(2474,9,28)}, {HijrahDate.of(1434,5,1), ThaiBuddhistDate.of(2556,3,13)}, {HijrahDate.of(1436,1,1), ThaiBuddhistDate.of(2557,10,25)}, {HijrahDate.of(1500,6,12), ThaiBuddhistDate.of(2620,5,5)}, {HijrahDate.of(1550,3,11), ThaiBuddhistDate.of(2668,8,11)}, }; }
Example 14
Source File: TCKThaiBuddhistChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilDate() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); ChronoPeriod period = mdate1.until(mdate2); assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); }
Example 15
Source File: TCKThaiBuddhistChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilDiffChrono() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); ChronoPeriod period = mdate1.until(ldate2); assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); }
Example 16
Source File: TCKThaiBuddhistChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilDiffChrono() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); ChronoPeriod period = mdate1.until(ldate2); assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); }
Example 17
Source File: TCKChronoLocalDateSerialization.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Object[][] data_of_calendars() { return new Object[][]{ {JapaneseDate.of(JapaneseEra.HEISEI, 25, 01, 05), JAPANESE_DATE_TYPE}, {MinguoDate.of(102, 01, 05), MINGUO_DATE_TYPE}, {ThaiBuddhistDate.of(2556, 01, 05), THAIBUDDHIST_DATE_TYPE}, }; }
Example 18
Source File: TCKThaiBuddhistChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void test_periodUntilDiffChrono() { ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); ChronoPeriod period = mdate1.until(ldate2); assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); }
Example 19
Source File: TCKThaiBuddhistChronology.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
private static ThaiBuddhistDate date(int y, int m, int d) { return ThaiBuddhistDate.of(y, m, d); }
Example 20
Source File: TCKThaiBuddhistChronology.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private static ThaiBuddhistDate date(int y, int m, int d) { return ThaiBuddhistDate.of(y, m, d); }