Platform SDK: International Features |
The EnumDateFormatsEx function enumerates the long or short date formats that are available for a specified locale, including date formats for any alternate calendars. The value of the dwFlags parameter determines whether the long date, short date, or year/month formats are enumerated. The function enumerates the date formats by passing date format string pointers, one at a time, to the specified application defined–callback function. This continues until the last date format is found or the callback function returns FALSE.
BOOL EnumDateFormatsEx ( DATEFMT_ENUMPROCEX lpDateFmtEnumProcEx, // callback function LCID Locale, // locale DWORD dwFlags // date formats );
Value | Meaning |
---|---|
LOCALE_SYSTEM_DEFAULT | Default system locale. |
LOCALE_USER_DEFAULT | Default user locale. |
Value | Meaning |
---|---|
LOCALE_USE_CP_ACP | Uses the system ANSI code page for string translation instead of the locale's code page. |
DATE_SHORTDATE | Return short date formats. This value cannot be used with DATE_LONGDATE. |
DATE_LONGDATE | Return long date formats. This value cannot be used with DATE_SHORTDATE. |
DATE_YEARMONTH | Return year/month formats. |
If the function succeeds, the return values is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError may return one of the following error codes:
Windows 2000: The ANSI version of this function will fail if it is used with a Unicode-only LCID. See Language Identifiers.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.
National Language Support Overview, National Language Support Functions, EnumDateFormatsProcEx, EnumCalendarInfo, EnumTimeFormats