Thanks Mark - that is fantastically helpful!! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Winterhalder Sent: 05 September 2007 06:00 To: [email protected] Subject: Re: [Flashcoders] Calculate how many days until date
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 thing, and you can also use Date.UTC(). <javascript:alert( "You have to wake up only " + Math.floor( (new Date( 2007, 12, 25 ) - new Date()) / (24 * 3600 * 1000) ) + " times until it's Christmas!" );> HTH, Mark _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

