Java Code Examples for java.time.chrono.ThaiBuddhistChronology#INSTANCE
The following examples show how to use
java.time.chrono.ThaiBuddhistChronology#INSTANCE .
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: TCKChronologySerialization.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Chronology[][] data_of_calendars() { return new Chronology[][]{ {HijrahChronology.INSTANCE}, {IsoChronology.INSTANCE}, {JapaneseChronology.INSTANCE}, {MinguoChronology.INSTANCE}, {ThaiBuddhistChronology.INSTANCE}}; }
Example 2
Source File: TestChronoLocalDate.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public <D extends ChronoLocalDate> void test_date_checkGenerics_genericsMethod_withType() { Chronology chrono = ThaiBuddhistChronology.INSTANCE; @SuppressWarnings("unchecked") D date = (D) chrono.dateNow(); date = processOK(date); // date = processClassOK(ThaiBuddhistDate.class); // does not compile (correct) date = dateSupplier(); // date = processWeird(date); // does not compile (correct) // date = processClassWeird(ThaiBuddhistDate.class); // does not compile (correct) }
Example 3
Source File: TCKChronoLocalDate.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Chronology[][] data_of_calendars() { return new Chronology[][]{ {HijrahChronology.INSTANCE}, {IsoChronology.INSTANCE}, {JapaneseChronology.INSTANCE}, {MinguoChronology.INSTANCE}, {ThaiBuddhistChronology.INSTANCE}}; }
Example 4
Source File: TestChronoLocalDate.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void test_date_checkGenerics_genericsMethod() { Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDate date = chrono.dateNow(); date = processOK(date); date = processClassOK(ThaiBuddhistDate.class); date = dateSupplier(); date = processClassWeird(ThaiBuddhistDate.class); }
Example 5
Source File: TCKChronoPrinterParser.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="parseValid") Object[][] data_parseValid() { return new Object[][] { {"ISO", IsoChronology.INSTANCE}, {"ThaiBuddhist", ThaiBuddhistChronology.INSTANCE}, {"Japanese", JapaneseChronology.INSTANCE}, {"ISO2012", IsoChronology.INSTANCE}, {"ThaiBuddhistXXX", ThaiBuddhistChronology.INSTANCE}, {"JapaneseXXX", JapaneseChronology.INSTANCE}, }; }
Example 6
Source File: TCKChronoLocalDateTimeSerialization.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Chronology[][] data_of_calendars() { return new Chronology[][]{ {HijrahChronology.INSTANCE}, {IsoChronology.INSTANCE}, {JapaneseChronology.INSTANCE}, {MinguoChronology.INSTANCE}, {ThaiBuddhistChronology.INSTANCE}}; }
Example 7
Source File: TCKChronologySerialization.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Chronology[][] data_of_calendars() { return new Chronology[][]{ {HijrahChronology.INSTANCE}, {IsoChronology.INSTANCE}, {JapaneseChronology.INSTANCE}, {MinguoChronology.INSTANCE}, {ThaiBuddhistChronology.INSTANCE}}; }
Example 8
Source File: TCKChronologySerialization.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Chronology[][] data_of_calendars() { return new Chronology[][]{ {HijrahChronology.INSTANCE}, {IsoChronology.INSTANCE}, {JapaneseChronology.INSTANCE}, {MinguoChronology.INSTANCE}, {ThaiBuddhistChronology.INSTANCE}}; }
Example 9
Source File: TCKThaiBuddhistChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_chrono_byName() { Chronology c = ThaiBuddhistChronology.INSTANCE; Chronology test = Chronology.of("ThaiBuddhist"); Assert.assertNotNull(test, "The ThaiBuddhist calendar could not be found byName"); Assert.assertEquals(test.getId(), "ThaiBuddhist", "ID mismatch"); Assert.assertEquals(test.getCalendarType(), "buddhist", "Type mismatch"); Assert.assertEquals(test, c); }
Example 10
Source File: TestChronoLocalDate.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void test_date_checkGenerics_genericsMethod() { Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDate date = chrono.dateNow(); date = processOK(date); date = processClassOK(ThaiBuddhistDate.class); date = dateSupplier(); date = processClassWeird(ThaiBuddhistDate.class); }
Example 11
Source File: TCKChronologySerialization.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "calendars") Chronology[][] data_of_calendars() { return new Chronology[][]{ {HijrahChronology.INSTANCE}, {IsoChronology.INSTANCE}, {JapaneseChronology.INSTANCE}, {MinguoChronology.INSTANCE}, {ThaiBuddhistChronology.INSTANCE}}; }
Example 12
Source File: TestChronoLocalDate.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime2() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<? extends ChronoLocalDate> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 13
Source File: TestChronoLocalDate.java From hottub with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime1() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<?> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 14
Source File: TestChronoLocalDate.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime1() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<?> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 15
Source File: TestChronoLocalDate.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime1() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<?> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 16
Source File: TestChronoLocalDate.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime2() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<? extends ChronoLocalDate> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 17
Source File: TestChronoLocalDate.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime1() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<?> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 18
Source File: TestChronoLocalDate.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public void test_date_checkGenerics_chronoLocalDateTime2() { LocalDateTime now = LocalDateTime.now(); Chronology chrono = ThaiBuddhistChronology.INSTANCE; ChronoLocalDateTime<? extends ChronoLocalDate> ldt = chrono.localDateTime(now); ldt = processCLDT(ldt); }
Example 19
Source File: TCKDateTimeFormatter.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="formatWithZoneWithChronology") Object[][] data_format_withZone_withChronology() { YearMonth ym = YearMonth.of(2008, 6); LocalDate ld = LocalDate.of(2008, 6, 30); LocalTime lt = LocalTime.of(11, 30); LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 11, 30); OffsetTime ot = OffsetTime.of(LocalTime.of(11, 30), OFFSET_PONE); OffsetDateTime odt = OffsetDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PONE); ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS); ChronoZonedDateTime<ThaiBuddhistDate> thaiZdt = ThaiBuddhistChronology.INSTANCE.zonedDateTime(zdt); Instant instant = Instant.ofEpochSecond(3600); return new Object[][] { {null, null, DayOfWeek.MONDAY, "::::"}, {null, null, ym, "2008::::ISO"}, {null, null, ld, "2008::::ISO"}, {null, null, lt, ":11:::"}, {null, null, ldt, "2008:11:::ISO"}, {null, null, ot, ":11:+01:00::"}, {null, null, odt, "2008:11:+01:00::ISO"}, {null, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, {null, null, instant, "::::"}, {IsoChronology.INSTANCE, null, DayOfWeek.MONDAY, "::::ISO"}, {IsoChronology.INSTANCE, null, ym, "2008::::ISO"}, {IsoChronology.INSTANCE, null, ld, "2008::::ISO"}, {IsoChronology.INSTANCE, null, lt, ":11:::ISO"}, {IsoChronology.INSTANCE, null, ldt, "2008:11:::ISO"}, {IsoChronology.INSTANCE, null, ot, ":11:+01:00::ISO"}, {IsoChronology.INSTANCE, null, odt, "2008:11:+01:00::ISO"}, {IsoChronology.INSTANCE, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, {IsoChronology.INSTANCE, null, instant, "::::ISO"}, {null, ZONE_PARIS, DayOfWeek.MONDAY, ":::Europe/Paris:"}, {null, ZONE_PARIS, ym, "2008:::Europe/Paris:ISO"}, {null, ZONE_PARIS, ld, "2008:::Europe/Paris:ISO"}, {null, ZONE_PARIS, lt, ":11::Europe/Paris:"}, {null, ZONE_PARIS, ldt, "2008:11::Europe/Paris:ISO"}, {null, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:"}, {null, ZONE_PARIS, odt, "2008:12:+02:00:Europe/Paris:ISO"}, {null, ZONE_PARIS, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, {null, ZONE_PARIS, instant, "1970:02:+01:00:Europe/Paris:ISO"}, {null, OFFSET_PTHREE, DayOfWeek.MONDAY, ":::+03:00:"}, {null, OFFSET_PTHREE, ym, "2008:::+03:00:ISO"}, {null, OFFSET_PTHREE, ld, "2008:::+03:00:ISO"}, {null, OFFSET_PTHREE, lt, ":11::+03:00:"}, {null, OFFSET_PTHREE, ldt, "2008:11::+03:00:ISO"}, {null, OFFSET_PTHREE, ot, null}, // offset and zone clash {null, OFFSET_PTHREE, odt, "2008:13:+03:00:+03:00:ISO"}, {null, OFFSET_PTHREE, zdt, "2008:12:+03:00:+03:00:ISO"}, {null, OFFSET_PTHREE, instant, "1970:04:+03:00:+03:00:ISO"}, {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, null, ym, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, null, ld, "2551::::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, lt, ":11:::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, ldt, "2551:11:::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, ot, ":11:+01:00::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, odt, "2551:11:+01:00::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, instant, "::::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ym, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ld, "2551:::Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, lt, ":11::Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ldt, "2551:11::Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, odt, "2551:12:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, instant, "2513:02:+01:00:Europe/Paris:ThaiBuddhist"}, {null, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {IsoChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2008:11:+02:00:Europe/Paris:ISO"}, }; }
Example 20
Source File: TCKDateTimeFormatter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="formatWithZoneWithChronology") Object[][] data_format_withZone_withChronology() { YearMonth ym = YearMonth.of(2008, 6); LocalDate ld = LocalDate.of(2008, 6, 30); LocalTime lt = LocalTime.of(11, 30); LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 11, 30); OffsetTime ot = OffsetTime.of(LocalTime.of(11, 30), OFFSET_PONE); OffsetDateTime odt = OffsetDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PONE); ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS); ChronoZonedDateTime<ThaiBuddhistDate> thaiZdt = ThaiBuddhistChronology.INSTANCE.zonedDateTime(zdt); Instant instant = Instant.ofEpochSecond(3600); return new Object[][] { {null, null, DayOfWeek.MONDAY, "::::"}, {null, null, ym, "2008::::ISO"}, {null, null, ld, "2008::::ISO"}, {null, null, lt, ":11:::"}, {null, null, ldt, "2008:11:::ISO"}, {null, null, ot, ":11:+01:00::"}, {null, null, odt, "2008:11:+01:00::ISO"}, {null, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, {null, null, instant, "::::"}, {IsoChronology.INSTANCE, null, DayOfWeek.MONDAY, "::::ISO"}, {IsoChronology.INSTANCE, null, ym, "2008::::ISO"}, {IsoChronology.INSTANCE, null, ld, "2008::::ISO"}, {IsoChronology.INSTANCE, null, lt, ":11:::ISO"}, {IsoChronology.INSTANCE, null, ldt, "2008:11:::ISO"}, {IsoChronology.INSTANCE, null, ot, ":11:+01:00::ISO"}, {IsoChronology.INSTANCE, null, odt, "2008:11:+01:00::ISO"}, {IsoChronology.INSTANCE, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, {IsoChronology.INSTANCE, null, instant, "::::ISO"}, {null, ZONE_PARIS, DayOfWeek.MONDAY, ":::Europe/Paris:"}, {null, ZONE_PARIS, ym, "2008:::Europe/Paris:ISO"}, {null, ZONE_PARIS, ld, "2008:::Europe/Paris:ISO"}, {null, ZONE_PARIS, lt, ":11::Europe/Paris:"}, {null, ZONE_PARIS, ldt, "2008:11::Europe/Paris:ISO"}, {null, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:"}, {null, ZONE_PARIS, odt, "2008:12:+02:00:Europe/Paris:ISO"}, {null, ZONE_PARIS, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, {null, ZONE_PARIS, instant, "1970:02:+01:00:Europe/Paris:ISO"}, {null, OFFSET_PTHREE, DayOfWeek.MONDAY, ":::+03:00:"}, {null, OFFSET_PTHREE, ym, "2008:::+03:00:ISO"}, {null, OFFSET_PTHREE, ld, "2008:::+03:00:ISO"}, {null, OFFSET_PTHREE, lt, ":11::+03:00:"}, {null, OFFSET_PTHREE, ldt, "2008:11::+03:00:ISO"}, {null, OFFSET_PTHREE, ot, null}, // offset and zone clash {null, OFFSET_PTHREE, odt, "2008:13:+03:00:+03:00:ISO"}, {null, OFFSET_PTHREE, zdt, "2008:12:+03:00:+03:00:ISO"}, {null, OFFSET_PTHREE, instant, "1970:04:+03:00:+03:00:ISO"}, {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, null, ym, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, null, ld, "2551::::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, lt, ":11:::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, ldt, "2551:11:::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, ot, ":11:+01:00::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, odt, "2551:11:+01:00::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, instant, "::::ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ym, null}, // not a complete date {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ld, "2551:::Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, lt, ":11::Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ldt, "2551:11::Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, odt, "2551:12:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, instant, "2513:02:+01:00:Europe/Paris:ThaiBuddhist"}, {null, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, {IsoChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2008:11:+02:00:Europe/Paris:ISO"}, }; }