The strftime() documentation says that formatting strings such as "%x" should follow the date formatting for the current locale. However, in my tests it always prints the date in US format mm/dd/yy. Using setlocale() does nothing, and locale prefs are ignored.
Does AmigaOS have a standard way of always getting the date formatting used by the current locale? Locale.library's FormatDate() still requires you to manually choose the date format, so that's not the answer. Is there a way to get a date format string for the user's locale choice?
Date formatting is a pretty common and basic task, so the OS really should be providing an easy way to get it right for the user's locale settings.
Hans
IDOS->DateToStr() with dat_Format set to FORMAT_DEF does that.
If you don't need the time you can set dat_StrTime to NULL.
It's half the answer though the other half is the following entries in struct Locale