[Gambas-user] WeekDay function

Ed & Clare Kelm twopilots at interisland.net
Thu May 17 01:42:48 CEST 2018


Benoit:

Thanks!  Changed my code per your comment.

Ed K.

On 05/15/2018 06:46 PM, Benoît Minisini wrote:
> 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,
>



More information about the User mailing list