Re: [flexcoders] AS3 Date month starting at 0?

2006-03-05 Thread Peter Hall



Ah... I should probably read the entire thread sometimes, rather than just jumping in the middle! :-)

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

















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








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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] AS3 Date month starting at 0?

2006-03-04 Thread Peter Hall



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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] AS3 Date month starting at 0?

2006-03-04 Thread Gordon Smith










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: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Peter Hall
Sent: Saturday, March 04, 2006
9:59 AM
To: flexcoders@yahoogroups.com
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Sönke Rohde
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

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





Re: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Johannes Nel



this is expected behaviour i thinkOn 3/3/06, Sönke Rohde [EMAIL PROTECTED] wrote:
Hi,Using the AS3-Date-Class the first time I recognized that the month isstarting 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 2006And 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 ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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/
-- j:pn http://www.lennel.org






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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Sönke Rohde





but why is month startingat 0 and day at 
1?
seems very strange to me.

  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Johannes 
  NelSent: Friday, March 03, 2006 3:04 PMTo: 
  flexcoders@yahoogroups.comSubject: Re: [flexcoders] AS3 Date month 
  starting at 0?
  this is expected behaviour i think
  On 3/3/06, Sönke 
  Rohde [EMAIL PROTECTED] wrote:
  Hi,Using 
the AS3-Date-Class the first time I recognized that the month isstarting 
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 2006And 
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 
ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
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/-- j:pn http://www.lennel.org





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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Peter Hall



It's the way it works in AS2, and the way it works in _javascript_. I don't know why it is designed like that, but it is correct.
Peter

On 3/3/06, Sönke Rohde [EMAIL PROTECTED] wrote:







but why is month startingat 0 and day at 
1?
seems very strange to me.







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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Paul Hastings
Peter Hall wrote:
 It's the way it works in AS2, and the way it works in JavaScript. I 
 don't know why it is designed like that, but it is correct.

because java does it that way?


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





RE: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Geoffrey Williams










day and month are constant pointers where
as year and date are variable values?











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





but why is month
startingat 0 and day at 1?

seems very strange to me.











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Johannes Nel
Sent: Friday, March 03, 2006 3:04
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3 Date
month starting at 0?

this is expected behaviour i think



On 3/3/06, Sönke Rohde [EMAIL PROTECTED] wrote:


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

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










-- 
j:pn 
http://www.lennel.org








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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Darron J. Schall
Sönke Rohde wrote:
 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?

Yeah - it's supposed to be like this (and has been like this for a long 
time).  Not a bug, sorry, you'll just have to account for the 0-indexed 
month in your code.

-d


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





RE: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Sönke Rohde

  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?
 
 Yeah - it's supposed to be like this (and has been like this 
 for a long 
 time).  Not a bug, sorry, you'll just have to account for the 
 0-indexed 
 month in your code.

Thanks a lot for all responses.
Btw: I ran into this issue getting a MySQL-Recordset back via amfphp where
the date-column arrives as a string in Flash. Parsing the date-string e.g.
2006-03-03 resulted as the third of April which I now learned is right.
Maybe amfphp with amf3-support can handle this better? Anyway - other topic
...

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

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




RE: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Gordon Smith
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:[EMAIL PROTECTED] 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/
 




Re: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Peter Hall



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 RohdeSent: Friday, March 03, 2006 2:08 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] AS3 Date month starting at 0?Hi,Using the AS3-Date-Class the first time I recognized that the month isstarting 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 2006And 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 2006Is this a known issue/bug or am I doing something wrong?Cheers,
Sönke--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links--Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Gordon Smith










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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.