I'm trying to create a LocalDate object:
LocalDate date = LocalDate.parse(
"1. juli 2014",
DateTimeFormatter.ofPattern("d. LLLL YYYY", new Locale("nb", "NO"));
But I get an exception:
java.time.format.DateTimeParseException: Text '1. juli 2014' could not be parsed:
Unable to obtain LocalDate from TemporalAccessor:
{WeekBasedYear[WeekFields[MONDAY,4]]=2014, MonthOfYear=7, DayOfMonth=1},
ISO of type java.time.format.Parsed
at java.time.format.DateTimeFormatter.createError(DateTimeFormatter.java:1919)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1854)
at java.time.LocalDate.parse(LocalDate.java:400)
The exception seems to indicate that the correct data is in there ("juli" is Norwegian and is month number 7).