Java Code Examples for java.time.LocalTime#withNano()
The following examples show how to use
java.time.LocalTime#withNano() .
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: TestDateTimeFunctionsBase.java From presto with Apache License 2.0 | 5 votes |
@Test public void testTruncateTime() { LocalTime result = TIME; result = result.withNano(0); assertFunction("date_trunc('second', " + TIME_LITERAL + ")", TimeType.TIME, toTime(result)); result = result.withSecond(0); assertFunction("date_trunc('minute', " + TIME_LITERAL + ")", TimeType.TIME, toTime(result)); result = result.withMinute(0); assertFunction("date_trunc('hour', " + TIME_LITERAL + ")", TimeType.TIME, toTime(result)); }
Example 2
Source File: TCKLocalTime.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 3
Source File: TCKLocalTime.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 4
Source File: TCKLocalTime.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 5
Source File: TCKLocalTime.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 6
Source File: TCKLocalTime.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 7
Source File: TCKLocalTime.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 8
Source File: TCKLocalTime.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 9
Source File: TCKLocalTime.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 10
Source File: TCKLocalTime.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 11
Source File: TCKLocalTime.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 12
Source File: TCKLocalTime.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 13
Source File: TCKLocalTime.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 14
Source File: TCKLocalTime.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }
Example 15
Source File: TCKLocalTime.java From j2objc with Apache License 2.0 | 5 votes |
@Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); assertEquals(t.getNano(), 1); t = t.withNano(10); assertEquals(t.getNano(), 10); t = t.withNano(100); assertEquals(t.getNano(), 100); t = t.withNano(999999999); assertEquals(t.getNano(), 999999999); }