Java Code Examples for java.time.chrono.Chronology#localDateTime()
The following examples show how to use
java.time.chrono.Chronology#localDateTime() .
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: TCKChronoLocalDateTime.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="calendars") public void test_from_TemporalAccessor(Chronology chrono) { LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); assertEquals(test1, dateTime); ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); assertEquals(test2, dateTime); }
Example 2
Source File: TCKChronoLocalDateTime.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="calendars") public void test_from_TemporalAccessor(Chronology chrono) { LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); assertEquals(test1, dateTime); ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); assertEquals(test2, dateTime); }
Example 3
Source File: TCKChronoLocalDateTime.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="calendars") public void test_from_TemporalAccessor(Chronology chrono) { LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); assertEquals(test1, dateTime); ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); assertEquals(test2, dateTime); }
Example 4
Source File: TCKChronoLocalDateTime.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="calendars") public void test_from_TemporalAccessor(Chronology chrono) { LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); assertEquals(test1, dateTime); ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); assertEquals(test2, dateTime); }
Example 5
Source File: TCKChronoLocalDateTime.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="calendars") public void test_from_TemporalAccessor(Chronology chrono) { LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); assertEquals(test1, dateTime); ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); assertEquals(test2, dateTime); }
Example 6
Source File: TCKChronoLocalDateTime.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="calendars") public void test_from_TemporalAccessor(Chronology chrono) { LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); assertEquals(test1, dateTime); ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); assertEquals(test2, dateTime); }
Example 7
Source File: TCKChronoLocalDateTime.java From j2objc with Apache License 2.0 | 4 votes |
@Test @UseDataProvider("data_of_calendars") public void test_getChronology(Chronology chrono) { ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30)); assertEquals(test.getChronology(), chrono); }
Example 8
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 9
Source File: TCKChronoLocalDateTime.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider="calendars") public void test_getChronology(Chronology chrono) { ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30)); assertEquals(test.getChronology(), chrono); }
Example 10
Source File: TestChronoLocalDate.java From openjdk-jdk9 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 11
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 12
Source File: TCKChronoLocalDateTime.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider="calendars") public void test_getChronology(Chronology chrono) { ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30)); assertEquals(test.getChronology(), chrono); }
Example 13
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 14
Source File: TCKChronoLocalDateTime.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider="calendars") public void test_getChronology(Chronology chrono) { ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30)); assertEquals(test.getChronology(), chrono); }
Example 15
Source File: TestChronoLocalDate.java From jdk8u-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 16
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 17
Source File: TestChronoLocalDate.java From openjdk-8-source 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 18
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 19
Source File: TCKChronoLocalDateTime.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider="calendars") public void test_getChronology(Chronology chrono) { ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30)); assertEquals(test.getChronology(), chrono); }
Example 20
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); }