Java Code Examples for java.time.format.DateTimeFormatter#formatTo()
The following examples show how to use
java.time.format.DateTimeFormatter#formatTo() .
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: TCKDateTimeFormatter.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_print_TemporalAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalDate.of(2008, 6, 30), buf); assertEquals(buf.toString(), "ONE30"); }
Example 2
Source File: TCKDateTimeFormatter.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_print_TemporalAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalDate.of(2008, 6, 30), buf); assertEquals(buf.toString(), "ONE30"); }
Example 3
Source File: TCKDateTimeFormatter.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test public void test_print_TemporalAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalDate.of(2008, 6, 30), buf); assertEquals(buf.toString(), "ONE30"); }
Example 4
Source File: TCKDateTimeFormatter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test public void test_print_TemporalAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalDate.of(2008, 6, 30), buf); assertEquals(buf.toString(), "ONE30"); }
Example 5
Source File: TCKDateTimeFormatter.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_print_TemporalAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalDate.of(2008, 6, 30), buf); assertEquals(buf.toString(), "ONE30"); }
Example 6
Source File: TCKDateTimeFormatter.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullTemporal() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo((TemporalAccessor) null, buf); }
Example 7
Source File: TCKDateTimeFormatter.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullTemporal() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo((TemporalAccessor) null, buf); }
Example 8
Source File: TCKDateTimeFormatter.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_print_TemporalAppendable_noSuchField() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalTime.of(11, 30), buf); }
Example 9
Source File: TCKDateTimeFormatter.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null); }
Example 10
Source File: TCKDateTimeFormatter.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null); }
Example 11
Source File: TCKDateTimeFormatter.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null); }
Example 12
Source File: TCKDateTimeFormatter.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null); }
Example 13
Source File: TCKDateTimeFormatter.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_print_TemporalAppendable_noSuchField() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalTime.of(11, 30), buf); }
Example 14
Source File: TCKDateTimeFormatter.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_print_TemporalAppendable_noSuchField() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalTime.of(11, 30), buf); }
Example 15
Source File: TCKDateTimeFormatter.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_print_TemporalAppendable_noSuchField() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalTime.of(11, 30), buf); }
Example 16
Source File: TCKDateTimeFormatter.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullTemporal() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo((TemporalAccessor) null, buf); }
Example 17
Source File: TCKDateTimeFormatter.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null); }
Example 18
Source File: TCKDateTimeFormatter.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullAppendable() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null); }
Example 19
Source File: TCKDateTimeFormatter.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=NullPointerException.class) public void test_print_TemporalAppendable_nullTemporal() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo((TemporalAccessor) null, buf); }
Example 20
Source File: TCKDateTimeFormatter.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_print_TemporalAppendable_noSuchField() throws Exception { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); StringBuilder buf = new StringBuilder(); test.formatTo(LocalTime.of(11, 30), buf); }