Localize string from `MonthDay` or `YearMonth` classes in java.time? [duplicate]
This question already has an answer here: How to format YearMonth and MonthDay depending on a Locale? 3 answers The java.time classes built into Java 8 and later offer the MonthDay and YearMonth classes. Their toString and parse methods use standard ISO 8601 formats ( --MM-DD & YYYY-MM ), which is wise. For presentation to humans, the standard formats may not be suitable. Is there anyway to generate an automatically localized string to represent the values in objects of either MonthDay or YearMonth ? For example, in the United States users might typically want MM/DD for month-day and MM/YY for