Re: [Flashcoders] Calculate how many days until date

2007-09-05 Thread Mark Winterhalder
On 9/5/07, Paul Steven [EMAIL PROTECTED] wrote: Thanks Mark - that is fantastically helpful!! You're welcome -- but I made a mistake, and it should be Math.ceil() instead of Math.floor(). You probably noticed that anyway. Mark ___

RE: [Flashcoders] Calculate how many days until date

2007-09-05 Thread Keith Reinfeld
] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Mark Winterhalder Sent: Wednesday, September 05, 2007 7:56 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Calculate how many days until date On 9/5/07, Paul Steven [EMAIL PROTECTED] wrote: Thanks Mark

[Flashcoders] Calculate how many days until date

2007-09-04 Thread Paul Steven
I need to calculate how many days there are until a specified date in the future. Is there any built in functionality to do this, or if not, can anyone point me in the right direction. I would imagine it is difficult to do manually as it would need to take account of leap years etc. Thanks Paul

Re: [Flashcoders] Calculate how many days until date

2007-09-04 Thread Mark Winterhalder
On 9/4/07, Paul Steven [EMAIL PROTECTED] wrote: I need to calculate how many days there are until a specified date in the future. Is there any built in functionality to do this, or if not, can anyone point me in the right direction. I would imagine it is difficult to do manually as it would

Re: [Flashcoders] Calculate how many days until date

2007-09-04 Thread Mark Winterhalder
On 9/5/07, Mark Winterhalder [EMAIL PROTECTED] wrote: trace( You have to wake up only + Math.floor( ((new Date( 2007, 12, 25 )).getTime() - (new Date()).getTime()) / (24 * 3600 * 1000) ) + times until it's Christmas! ); Actually, you don't even need the getTime() -- valueOf() does the same