[Bug 5884] VB6 application fails to convert date to string formatted weekdays
http://bugs.winehq.org/show_bug.cgi?id=5884 --- Comment #14 from Alex Balut <alexandru.balut(a)gmail.com> 2007-12-01 06:38:43 --- (In reply to comment #13)
if you pass 1 as iFirstDay, the first day of week is sunday as in US;
If I pass 1 as iFirstDay I get the first day of the week to be Tuesday, which is wrong. I'll fix the problem. But I'm not sure I understand what you wanted to say.
if you pass 0 and read 0 from the locale, it is _monday_. (don't ask me why...)
That is how it should be. I think the code runs fine when iFirstDay is 0, but indeed, there is a bug in the patch I attached when iFirstDay is >0. When iFirstDay is 0 it should actually be set to firstDay + 1 and then localeValue += (iWeekday - 1 + iFirstDay - 1) % 7. LOCALE_SABBREVDAYNAME1 is Monday according to the MS documentation.
test does not check the returned values to match any (hardcoded) values
which is why your test can't check this, you can try it with this test http://www.nabble.com/olaut32:-VarWeekdayName-test-t4209794.html
It checks the names against what is read from the locale, so it should work under any locale.
I had doubts about having both the function and the function test on the same calls but I'll extend the test, better be safe. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org