Why is date being formatted with a dot (period) after month abbreviation in en_AU locale?
Java 1.8 Apache Tomcat 8.5.55
My server-side date parsing code:
Locale locale = Locale.getDefault();
String lang = locale.getDisplayLanguage();
String country = locale.getDisplayCountry();
System.out.println(lang);
System.out.println(country);
LocalDate localDate1 = LocalDate.of(2023, 4, 10);
ZoneId zone = ZoneId.systemDefault();
Instant atStartOfDay = localDate1.atStartOfDay(zone).toInstant();
String format = Constants.Format.user_dmy_df.get().format(Date.from(atStartOfDay));
System.out.println(format);
Note:
public class Constants{
public static class Format{
public static final ThreadLocal user_dmy_df = new ThreadLocal() {
@Override
protected DateFormat initialValue() {
return new SimpleDateFormat("dd-MMM-yyyy");
}
};
}
}
The output:
English
Australia
10-Apr.-2023
Why is there a period after the month abbreviation? This isn't AU formatting. When I run the same code locally in a unit test (also en_AU) there is no period.