A Java 8 DateTimeFormatter
created from a pattern like d. MMM u
can only parse dates with the month written in the style defined by TextStyle.SHORT (e.g. 13. Feb 2015
), a DateTimeFormatter created from d. MMMM u
can only parse dates with the month written in the style defined by TextStyle.FULL (e.g. 13. February 2015
).
In the "old" SimpleDateFormat, the difference between "MMM" and "MMMM" was only important for formatting, not for parsing, so it was easily possible to create a parser that understood both the FULL and the SHORT form of month names.
Is it possible to create a Java 8 DateTimeFormatter that can also do this? Or do I always have to create two parsers, one with the FULL and one with the SHORT pattern?