How to get full name of month from date in Java 8 while formatting

Apurva Singh picture Apurva Singh · Apr 12, 2017 · Viewed 20k times · Source

Using new Java 8 java.time API, I need to convert LocalDate and get full name of month and day. Like March (not Mar), and Monday (not Mon). Friday the 13th March should be formatted like Friday, 13 March.. not Fri, 13 Mar.

Answer

Joe C picture Joe C · Apr 12, 2017

The string you are looking for is MMMM.

Source: DateTimeFormatter Javadoc