Added further implementation of WINAPI EnumDateFormats() to support

three more locales: German(standard), French(standard) and French
(canadian). All date formats follow conventions from Windows NT 4.0
This commit is contained in:
Owen Wang 2000-04-15 20:36:43 +00:00 committed by Alexandre Julliard
parent 1db182f20b
commit 7b080ec258
1 changed files with 65 additions and 2 deletions

View File

@ -3370,8 +3370,6 @@ BOOL WINAPI EnumDateFormatsA(
DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags) DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
LCID Loc = GetUserDefaultLCID(); LCID Loc = GetUserDefaultLCID();
FIXME("Only different English Locales supported \n");
if(!lpDateFmtEnumProc) if(!lpDateFmtEnumProc)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
@ -3381,6 +3379,71 @@ BOOL WINAPI EnumDateFormatsA(
switch( Loc ) switch( Loc )
{ {
case 0x00000407: /* (Loc,"de_DE") */
{
switch(dwFlags)
{
case DATE_SHORTDATE:
if(!(*lpDateFmtEnumProc)("dd.MM.yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d.M.yyyy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d.MM.yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d.M.yy")) return TRUE;
return TRUE;
case DATE_LONGDATE:
if(!(*lpDateFmtEnumProc)("dddd,d. MMMM yyyy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d. MMMM yyyy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d. MMM yyyy")) return TRUE;
return TRUE;
default:
FIXME("Unknown date format (%ld)\n", dwFlags);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
}
case 0x0000040c: /* (Loc,"fr_FR") */
{
switch(dwFlags)
{
case DATE_SHORTDATE:
if(!(*lpDateFmtEnumProc)("dd/MM/yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("dd.MM.yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("dd-MM-yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("dd/MM/yyyy")) return TRUE;
return TRUE;
case DATE_LONGDATE:
if(!(*lpDateFmtEnumProc)("dddd d MMMM yyyy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d MMM yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d MMMM yyyy")) return TRUE;
return TRUE;
default:
FIXME("Unknown date format (%ld)\n", dwFlags);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
}
case 0x00000c0c: /* (Loc,"fr_CA") */
{
switch(dwFlags)
{
case DATE_SHORTDATE:
if(!(*lpDateFmtEnumProc)("yy-MM-dd")) return TRUE;
if(!(*lpDateFmtEnumProc)("dd-MM-yy")) return TRUE;
if(!(*lpDateFmtEnumProc)("yy MM dd")) return TRUE;
if(!(*lpDateFmtEnumProc)("dd/MM/yy")) return TRUE;
return TRUE;
case DATE_LONGDATE:
if(!(*lpDateFmtEnumProc)("d MMMM, yyyy")) return TRUE;
if(!(*lpDateFmtEnumProc)("d MMM yyyy")) return TRUE;
return TRUE;
default:
FIXME("Unknown date format (%ld)\n", dwFlags);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
}
case 0x00000809: /* (Loc,"en_UK") */ case 0x00000809: /* (Loc,"en_UK") */
{ {
switch(dwFlags) switch(dwFlags)