var d:Date = new Date();
d.setDate(today_date.getDate()+10);

Did you try this? Date class has loads of methods to do this.

-abdul



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of delaquae
Sent: Friday, September 23, 2005 12:44 AM
To: [email protected]
Subject: [flexcoders] Really basic ActionScript question.

I've implemented a class (via ActionScript) for a Flex app that uses 
the class as a dataprovider. The class needs to increment a Date 
object by a number of days.  i.e.

var d:Date=new Date();

journalDate = d // plus some number of days

If I add i to d all I get is the time being incremented.  How would I 
increment d by i days, while preserving the correct month & year?

if the date is 08/31/2005 what do I need to do to add one day and have 
it equal 09/01/2005?  Do I really have to write the logic to check for 
the end of each month and increment the month and year accordingly?  
There must be a really simple way to do this that a non-ActionScript 
savvy person such as myself is not aware of...  Sorry about 
the "ActionScript newbie" nature of this question...






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



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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


Reply via email to