hello :) try this :
var d:Date = new Date() ; var oneDayInMS:Number = 1000*60*60*24 ; var timestamp:Number = d.valueOf() ; var yesteday:Date = new Date( timestamp - oneDayInMS ) ; trace( d + " : " + yesteday ) ; EKA+ :) 2007/3/27, natalia Vikhtinskaya <[EMAIL PROTECTED]>:
I am looking for date object, but not sure it is possible cur_day = new Date(); trace(cur_day)//Tue Mar 27 13:16:34 GMT+0400 2007 //trace(cur_day.getDate()); var1=cur_day.getDate()-1;//27 trace(var1);//26 so it is not date object 2007/3/27, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Is this simple? > > cur_day = new Date(); > //trace(cur_day.getDate()); > Var1=cur_day.getDate()-1;//27 > trace(var1);//26 > > -----Original Message----- > From: natalia Vikhtinskaya [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 27, 2007 2:26 PM > To: Flashcoders mailing list > Subject: [Flashcoders] How to find yesterday? > > Hi > > How to find yesterday as date object? > > cur_day= new Date(); > yest_day=? > > What is the simple way for that? > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > > > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > _______________________________________________ Flashcoders@chattyfig.figleaf.com 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
_______________________________________________ Flashcoders@chattyfig.figleaf.com 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