oleaut32: be more explicit with locale dependent parsing of dates (try 2)

Nikolay Sivov nsivov at codeweavers.com
Thu Apr 15 04:33:01 CDT 2010


On 4/14/2010 23:56, André Hentschel wrote:
> Nikolay Sivov schrieb:
>    
>> On 4/14/2010 22:51, André Hentschel wrote:
>>      
>>>        case 0x3: /* TTT TTTDD TTTDDD */
>>> -      if (iDate&&   dp.dwCount == 3)
>>> +      if (dp.dwCount == 3&&   !strncmp(ShortDate,"dd.MM.yy",8))
>>>
>>>
>>>        
>>      
>>>        case 0x1B: /* localized DDDTTT */
>>> -      if (!iDate)
>>> +      if (strncmp(ShortDate,"dd.MM.yy",8))
>>>            {
>>>              hRet = DISP_E_TYPEMISMATCH;
>>>              break;
>>>
>>>        
>> This looks like a workaround. I don't think you should hard code it this
>> way, what's so special with this format?
>> And what is a initial problem with that?
>>
>>
>>      
> The date and time parsing is locale dependent of course, but the code is mainly written for english.
> There was a bug so i fixed it and introduced a regression and bug 22287 came up.
>    
Yes, but that doesn't mean it should be hard coded this way. Am I right 
it should use localized format and try to fit input in it?
If so, this should be fixed in a general way.




More information about the wine-devel mailing list