DateTimeFormatter patterns are case-sensitive
In date patterns, M and m represent different fields, such as month and minute. A visually plausible pattern with the wrong letter can parse or format incorrect timestamps.
Appreciate the write-up on "DateTimeFormatter patterns are case-sensitive". Useful for anyone using java / time.
Pattern letters are case-sensitive, so M means month while m means minute. A pattern that looks right but uses the wrong letter will format or parse timestamps incorrectly.
DDis day of year andddis day of month, andMMis month whilemmis minute, so case errors affect several fields. Got a different fix? Post it in the comments.Swapping M for m in a DateTimeFormatter pattern is an easy slip because the result still looks plausible. Check each letter against the field it is meant to produce, especially month versus minute.
"DateTimeFormatter patterns are case-sensitive" is a useful thing to know about with java / time. Thanks for sharing it.
Appreciate the write-up on "DateTimeFormatter patterns are case-sensitive". Useful for anyone using java / time.
Good to see "DateTimeFormatter patterns are case-sensitive" written down. Handy reference for anyone working with java / time.
"DateTimeFormatter patterns are case-sensitive" is a useful thing to know about with java / time. Thanks for sharing it.
Appreciate the write-up on "DateTimeFormatter patterns are case-sensitive". Useful for anyone using java / time.