JDK dateformatter parsing DayOfWeek in German locale, java8 vs java9
I have tried some code in Java 8 (1.8.0_77) and Java 9 (Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)) DateTimeFormatter dtf = DateTimeFormatter.ofPattern("eee", Locale.GERMAN); DayOfWeek mo = dtf.parse("Mo", DayOfWeek::from); System.out.println("mo = " + mo); I am not too familiar with details of those classes, but in Java 8 this works, printing: mo = MONDAY In Java 9, however it fails Exception in thread "main" java.time.format.DateTimeParseException: Text 'Mo' could not be parsed at index 0 at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java