Commit 7b080ec2 authored by Owen Wang's avatar Owen Wang Committed by Alexandre Julliard

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
parent 1db182f2
......@@ -3370,8 +3370,6 @@ BOOL WINAPI EnumDateFormatsA(
DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags)
{
LCID Loc = GetUserDefaultLCID();
FIXME("Only different English Locales supported \n");
if(!lpDateFmtEnumProc)
{
SetLastError(ERROR_INVALID_PARAMETER);
......@@ -3381,6 +3379,71 @@ BOOL WINAPI EnumDateFormatsA(
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") */
{
switch(dwFlags)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment