List of usage examples for java.time.format TextStyle FULL_STANDALONE
TextStyle FULL_STANDALONE
To view the source code for java.time.format TextStyle FULL_STANDALONE.
Click Source Link
From source file:Main.java
public static void main(String[] args) { DateTimeFormatter formatter = new DateTimeFormatterBuilder().appendLiteral("New Year in ") .appendValue(ChronoField.YEAR).appendLiteral(" is on ") .appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL_STANDALONE).toFormatter(); LocalDate ld = LocalDate.of(2014, Month.JANUARY, 1); String str = ld.format(formatter); System.out.println(str);/* w w w . j a va 2 s . c o m*/ }