How to parse case-insensitive strings with JSR-310 DateTimeFormatter?

And there is… according to the User Guide (offline, see JavaDoc instead), you should use DateTimeFormatterBuilder to build a complex DateTimeFormatter

e.g.

DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
builder.parseCaseInsensitive();
builder.appendPattern("dd-MMM-yyyy");
DateTimeFormatter dateFormat = builder.toFormatter();

Leave a Comment