GetLocalizeFormatString (open)
Convert a FormatDateTime formatting string to ICU format for use with LocalizeDateTime
Syntax
LOADLIB "wh::util/localization.whlib";
STRING FUNCTION GetLocalizeFormatString(STRING formatstring)
Parameters
STRING formatstring
The format to convert
Return value
STRING
The converted format
Description
This function creates a LocalizedDateTime formatting string that is equivalent to the given FormatDateTime string. To get the exact same result, be sure to set the useexact parameter to TRUE when calling LocalizedDateTime. There are two differences between FormatDateTime and LocalizeDateTime with GetLocalizeFormatString: for both "%#y" and "%#Q", the leading zeroes are not removed, because of limitations of the ICU formatting functions. It is advised to use LocalizeDateTime with a ICU formatting string instead of the old FormatDateTime formatting string where possible.