My CodenameOne app (iOS port of an Android app) shows a date-time format example to the user, according to the Locale.
This is the Java code in my Android app:
static String getTheCurrentLocaleDateTimeFormatString() {
return ((SimpleDateFormat) DateFormat.getDateTimeInstance()).toLocalizedPattern();
}
For example in my Locale I get this string:
dd MMM y HH:mm:ss
No modification to the app design can be done on this.
Documentation here : https://www.codenameone.com/javadoc/java/text/DateFormat.html
says DateFormat is deprecated and has issue on some platforms, like iOS itself. It is only used for this, I left it in my Android app by the way.
However, I can't use its methods because they are not the same in CodenameOne, if I am not wrong.
Documentation says to use L10NManager instead, but I have to change the code.
What is the right way to use L10NManager to achieve the same goal?