[Gambas-user] WeekDay function
Benoît Minisini
g4mba5 at gmail.com
Wed May 16 03:46:04 CEST 2018
Le 16/05/2018 à 03:05, Ed & Clare Kelm a écrit :
> List:
>
> Just got an update (3.11.2) to Gambas3, and the WeekDay function now is
> off by one day.
>
> WeekDay("1/1/2018") returns "0" (Sunday), but should return "1"
> (Monday). Any other date is also off, by the same amount.
>
> I verified in a laptop running Xubuntu 14.04, and in one running Xubuntu
> 16.04.
>
> Thanks!
>
"1/1/2018" is not a date, but a string. So it is converted to an UTC
date, and not incorrectly to a local date as before.
So if your string represents a local date, you have to use Str() or
otherwise forge the Date with the Date() function.
Regards,
--
Benoît Minisini
More information about the User
mailing list