[Gambas-user] False Documentation for Date

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Mon Feb 6 18:15:49 CET 2006


gb.Weekday appears to return the wrong result. Today (Monday) it returns 6
on my machine.

However:
	IF Weekday(Now) = gb.Monday THEN
		PRINT "Monday ", Weekday(Now), gb.Monday
	END IF
returns the right result.
Use
	Weekday(Now)

Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>


-----Original Message-----
From: gambas-user-admin at lists.sourceforge.net
[mailto:gambas-user-admin at lists.sourceforge.net]On Behalf Of Laurent
Carlier
Sent: Monday, 06 February 2006 11:07
To: gambas-user at lists.sourceforge.net
Subject: Re: [Gambas-user] False Documentation for Date


Le Lundi 6 Février 2006 11:49, Eilert a écrit :
> In the help for the date function "WeekDay" the numbers in the example
> seems to be false:
>
> On my system, Sunday returns "0", not "7". So it seems to count like on
> American calendars. Does this depend on local settings, or can I rely on
> it staying this way?
>
> Rolf
>

Perhaps it's better to use predefined constants like gb.Sunday instead of 0
or
7 ?
Does it work with predefined constants ?

Regards,

--
jabber : lordheavy at ...943...
mail : lordheavymREMOVEME at ...626...



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list