Sure, it's perfectly happy to coerce a string like "2006" to the number 2006. But if you pass 2006 it wouldn't have to coerce anything.

 

- Gordon

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Peter Hall
Sent: Friday, March 03, 2006 1:01 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3 Date month starting at 0?

 

Gordon,
>From what I can tell, Date is perfectly happy to take a string in its constructor. This is new in AS3...

Peter

On 3/3/06, Gordon Smith <[EMAIL PROTECTED]> wrote:

January being month 0 in the Date class is required by the ECMA-262 standard that we're following, since we want AS3 to be compatible with Ecmascript.

Dunno what's going on with the GMT. That looks weird.

BTW, you should be passing numbers, not strings, to the Date constructor.

- Gordon


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sönke Rohde
Sent: Friday, March 03, 2006 2:08 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AS3 Date month starting at 0?

Hi,
Using the AS3-Date-Class the first time I recognized that the month is
starting at 0 means 0 is January. Is this the expected behaviour?

Example:
var d:Date = new Date("2006","03","22");
trace("date " + d); // date Sat Apr 22 00:00:00 GMT+0200 2006

And another date I tried has a different GMT:
var d:Date = new Date("2006","10","18");
trace("date " + d); // date Sat Nov 18 00:00:00 GMT+0100 2006

Is this a known issue/bug or am I doing something wrong?

Cheers,
Sönke



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to