How to get full name of month from date in Java 8 while formatting
问题 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. 回答1: The string you are looking for is MMMM . Source: DateTimeFormatter Javadoc 回答2: tl;dr Use automatic localization. No need to specify formatting pattern. localDate.format( DateTimeFormatter.ofLocalizedDate( FormatStyle.FULL ) .withLocale( Locale.UK ) ) Monday, 23