Hour '0' corresponds to 12AM.

This commit is contained in:
Duane Clark 2005-04-15 16:10:39 +00:00 committed by Alexandre Julliard
parent a9cbabc03c
commit b00d5769da
1 changed files with 14 additions and 2 deletions

View File

@ -339,9 +339,21 @@ DATETIME_ReturnTxt (DATETIME_INFO *infoPtr, int count, LPWSTR result, int result
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDAYNAME1+(date.wDayOfWeek+6)%7, result, resultSize);
break;
case ONEDIGIT12HOUR:
if (date.wHour == 0) {
result[0] = '1';
result[1] = '2';
result[2] = 0;
}
else
wsprintfW (result, fmt_dW, date.wHour - (date.wHour > 12 ? 12 : 0));
break;
case TWODIGIT12HOUR:
if (date.wHour == 0) {
result[0] = '1';
result[1] = '2';
result[2] = 0;
}
else
wsprintfW (result, fmt__2dW, date.wHour - (date.wHour > 12 ? 12 : 0));
break;
case ONEDIGIT24HOUR: