Yes, but that's not what the code I commented on was doing. It was doing

 

    new Date("2006", "03", "22");

 

I was simply trying to point out that it would be more efficient to do

 

    new Date(2006, 3, 22);

 

rather than having "2006" coerce to 2006, "03" coerce to 3, and "22" coerce to 22.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Peter Hall
Sent: Saturday, March 04, 2006 9:59 AM
To: [email protected]
Subject: Re: [flexcoders] AS3 Date month starting at 0?

 

I'm sure it's doing slightly more than an implicit coercion, when you do something like:

     new Date("Mar 10 20:00 2006");

;-)


Peter

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

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

 





--
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