N
N
neotran2019-03-18 08:50:10
Java
neotran, 2019-03-18 08:50:10

DateTimeParseException?

There is a string Июль 2013 г.
When you try to parse it

f = DateTimeFormatter.ofPattern("MMMM yyyy 'г.'", new Locale("ru"));
                LocalDate date = LocalDate.parse(dateString, f);

An exception is thrown
java.time.format.DateTimeParseException: Text 'Июль 2013 г.' could not be parsed at index 0

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neotran, 2019-03-18
@neotran

Replaced MMMM with LLLL, added 01 at the beginning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question