[Gambas-user] Week function and localization
Benoît Minisini
gambas at ...1...
Wed Dec 22 18:14:07 CET 2010
> ? Week(Date(2005, 7, 24))
> 30
> Calendar says 29, however this doesn't seem to be this simple...
>
> See end of this page, section 'weeks', week number options.
> http://www.timeanddate.com/calendar/custommenu.html?year=2005&country=9&wno
> =5&holm=1&df=1
>
> Seems that there are several ways how week numbers are counted in different
> countries!
> So, with same date, 30 is wrong in Finland but correct in Japan....
>
> Jussi
This is the reason why Week() has two optional arguments. Apparently there is
no information in the localization system settings that allows to know how to
compute the week number from a date. So this is up to the programmer to decide
himself by using the two optional arguments of Week().
Regards,
--
Benoît Minisini
More information about the User
mailing list