RE: [flexcoders] Re: date problem?
ECMAScript did it this way and ActionScript was trying to follow ECMAScript. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of John Fletcher Sent: Friday, January 13, 2012 6:23 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: date problem? Or maybe the person that wrote the Java Date class is from Venus and the person that wrote the Actionscript one just copied him. You might get quite some support on the Java assertion... John 2012/1/13 Rick Winscot mailto:rick.wins...@zyche.com>> I'm suspicious... I think that the person that wrote the Date class is from Venus. Cheers, Rick Winscot From: John Fletcher mailto:fletch...@gmail.com>> Reply-To: "flexcoders@yahoogroups.com<mailto:flexcoders@yahoogroups.com>" mailto:flexcoders@yahoogroups.com>> Date: Fri, 13 Jan 2012 10:03:28 +0100 To: "flexcoders@yahoogroups.com<mailto:flexcoders@yahoogroups.com>" mailto:flexcoders@yahoogroups.com>> Subject: Re: [flexcoders] Re: date problem? Months start at 0 and go up to 11. Don't ask me why. John 2012/1/12 luvfotography mailto:ygro...@all-digital-links.com>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#methodSummary says: If you pass two or more arguments, the Date object is assigned a time value based on the argument values passed, which represent the date's year, month, date, hour, minute, second, and milliseconds. --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, "luvfotography" mailto:ygroups@...>> wrote: > > Why does: > trace((new Date(2012,01,15)).toString()); > and > trace((new Date('2012','01','15')).toString()); > > return: > > Wed Feb 15 00:00:00 GMT-0800 2012 > > February?? > -- John You're old enough to make your own decisions about the environment without me telling you what you should and shouldn't print. But if you do print, I hope this signature doesn't cause the message to go onto an additional page. Because that would be kind of stupid, wouldn't it?
Re: [flexcoders] Re: date problem?
Or maybe the person that wrote the Java Date class is from Venus and the person that wrote the Actionscript one just copied him. You might get quite some support on the Java assertion... John 2012/1/13 Rick Winscot > ** > > > I'm suspicious… I think that the person that wrote the Date class is from > Venus. > > Cheers, > > Rick Winscot > > From: John Fletcher > Reply-To: "flexcoders@yahoogroups.com" > Date: Fri, 13 Jan 2012 10:03:28 +0100 > To: "flexcoders@yahoogroups.com" > Subject: Re: [flexcoders] Re: date problem? > > > > Months start at 0 and go up to 11. > > Don't ask me why. > > John > > 2012/1/12 luvfotography > >> ** >> >> >> >> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#methodSummary >> >> says: >> >> If you pass two or more arguments, the Date object is assigned a time >> value based on the argument values passed, which represent the date's year, >> month, date, hour, minute, second, and milliseconds. >> >> >> --- In flexcoders@yahoogroups.com, "luvfotography" wrote: >> > >> > Why does: >> > trace((new Date(2012,01,15)).toString()); >> > and >> > trace((new Date('2012','01','15')).toString()); >> > >> > return: >> > >> > Wed Feb 15 00:00:00 GMT-0800 2012 >> > >> > February?? >> > >> >> > > > -- > John > > *You're old enough to make your own decisions about the environment > without me telling you what you should and shouldn't print. But if you do > print, I hope this signature doesn't cause the message to go onto an > additional page. Because that would be kind of stupid, wouldn't it?* > > >
Re: [flexcoders] Re: date problem?
I'm suspicious I think that the person that wrote the Date class is from Venus. Cheers, Rick Winscot From: John Fletcher Reply-To: "flexcoders@yahoogroups.com" Date: Fri, 13 Jan 2012 10:03:28 +0100 To: "flexcoders@yahoogroups.com" Subject: Re: [flexcoders] Re: date problem? Months start at 0 and go up to 11. Don't ask me why. John 2012/1/12 luvfotography > > > > > > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#m > ethodSummary > > says: > > If you pass two or more arguments, the Date object is assigned a time value > based on the argument values passed, which represent the date's year, month, > date, hour, minute, second, and milliseconds. > > > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , > "luvfotography" wrote: >> > >> > Why does: >> > trace((new Date(2012,01,15)).toString()); >> > and >> > trace((new Date('2012','01','15')).toString()); >> > >> > return: >> > >> > Wed Feb 15 00:00:00 GMT-0800 2012 >> > >> > February?? >> > > > > > > > -- John You're old enough to make your own decisions about the environment without me telling you what you should and shouldn't print. But if you do print, I hope this signature doesn't cause the message to go onto an additional page. Because that would be kind of stupid, wouldn't it?
Re: [flexcoders] Re: date problem?
Months start at 0 and go up to 11. Don't ask me why. John 2012/1/12 luvfotography > ** > > > > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#methodSummary > > says: > > If you pass two or more arguments, the Date object is assigned a time > value based on the argument values passed, which represent the date's year, > month, date, hour, minute, second, and milliseconds. > > > --- In flexcoders@yahoogroups.com, "luvfotography" wrote: > > > > Why does: > > trace((new Date(2012,01,15)).toString()); > > and > > trace((new Date('2012','01','15')).toString()); > > > > return: > > > > Wed Feb 15 00:00:00 GMT-0800 2012 > > > > February?? > > > > > -- John *You're old enough to make your own decisions about the environment without me telling you what you should and shouldn't print. But if you do print, I hope this signature doesn't cause the message to go onto an additional page. Because that would be kind of stupid, wouldn't it?*
[flexcoders] Re: date problem?
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html#methodSummary says: If you pass two or more arguments, the Date object is assigned a time value based on the argument values passed, which represent the date's year, month, date, hour, minute, second, and milliseconds. --- In flexcoders@yahoogroups.com, "luvfotography" wrote: > > Why does: > trace((new Date(2012,01,15)).toString()); > and > trace((new Date('2012','01','15')).toString()); > > return: > > Wed Feb 15 00:00:00 GMT-0800 2012 > > February?? >
[flexcoders] Re: Date problem - going over daylight saving date
Hi Peter, The problem is that Date class does not provide method addDay() as would any decent class will do. So you have to muck around manually. and it does mean that you have to deal with timezones and other stuff you really don't want to deal with. And by the way - DateChooser component will not select current date with nice blue colour unless you set hours, minutes & seconds to zero. And here comes the problem of calendar navigation. PS I am not surprised with the reaction on this problem - Adobe is still 100% designer company and Microsoft is 100% software company. I keep dreaming about at least 80-20 mixture... :) Cheers, Dmitri. --- In flexcoders@yahoogroups.com, "Peter Anselmo" <[EMAIL PROTECTED]> wrote: > > I have been doing a scheduling app that runs into this issue.. if you think > about it.. adding 24 hours isn't always the same as adding a day because a > day can be 23, 24 or 25 hours. If you want to add a day, you should find > the number of hours between the two days that you want and use that. > > Peter >