Add wxGetUIDateFormat() helper function

Retrieve thr date format to use, even when wxUSE_INTL==0.
This commit is contained in:
Vadim Zeitlin
2021-08-14 19:08:21 +01:00
parent e438f9a496
commit 8fa853a3e2
2 changed files with 28 additions and 1 deletions

View File

@@ -67,6 +67,18 @@ private:
wxDECLARE_NO_COPY_CLASS(wxUILocale);
};
#endif // wxUSE_INTL
inline wxString wxGetUIDateFormat()
{
return wxUILocale::GetCurrent().GetInfo(wxLOCALE_SHORT_DATE_FMT);
}
#else // !wxUSE_INTL
inline wxString wxGetUIDateFormat()
{
return wxString(wxS("%x"));
}
#endif // wxUSE_INTL/!wxUSE_INTL
#endif // _WX_UILOCALE_H_