[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
RE: [Flashcoders] How to find yesterday?
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
Re: [Flashcoders] How to find yesterday?
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
Re: [Flashcoders] How to find yesterday?
[EMAIL PROTECTED] schrieb: Is this simple? cur_day = new Date(); //trace(cur_day.getDate()); Var1=cur_day.getDate()-1;//27 trace(var1);//26 the above doesn't take into account Day 1 of the current Month: function getYesterday () { var t:Date = new Date (); var daysBack:Number = 1; var today:Date = new Date (t.getFullYear (), t.getMonth (), t.getDate () - daysBack); return (today.getDate ()); } cheers micha ___ 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
Re: [Flashcoders] How to find yesterday?
Ooops... my method is the tomorrow method and not the yesterday .. but it's the same :) PS : If you want you can use my Calendar class based on my OpenSource AS2 framework (VEGAS : http://vegas.riaforge.org/) 1 - install the Vegas project in your computer with the direct download button in the riaforge project page or with a SVN client likre tortoire SVN ... use the svn url : http://svn1.cvsdude.com/osflash/vegas/ 2 - install in flash the AS2/trunk/src/ directory in the AS2 preferences 3 - test my Calendar class with the examples in the directory AS2/trunk/bin/test/asgard/date : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/date/ ( Calendar.fla) 4 - You can read the class in this link : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/date/Calendar.as I must refresh my documentation to night with the last change over the libraries ... http://vegas.ekameleon.net/docs Example : import asgard.date.Calendar ; trace ( yesterday : + (Calendar.yesterday()).format( -mm-dd) ) ; trace ( toDay : + (new Calendar()).format( -mm-dd) ) ; trace ( tomorrow : + (Calendar.tomorrow()).format( -mm-dd) ) ; PS : The calendar class extends the Date class... EKA+ :) 2007/3/27, eka [EMAIL PROTECTED]: 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
RE: [Flashcoders] How to find yesterday?
Try this: var CurrentDate:Date = new Date(); trace(CurrentDate); var SubtractedDate:Date = new Date(CurrentDate.getTime() - 1*24*60*60*1000); trace(SubtractedDate); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of natalia Vikhtinskaya Sent: 27 March 2007 10:17 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] How to find yesterday? 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
RE: [Flashcoders] How to find yesterday?
var yesterday:Date; yesterday = new Date(); yesterday.setDate( yesterday.getDate() - 1 ); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Stuhr Sent: 27 March 2007 10:19 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] How to find yesterday? [EMAIL PROTECTED] schrieb: Is this simple? cur_day = new Date(); //trace(cur_day.getDate()); Var1=cur_day.getDate()-1;//27 trace(var1);//26 the above doesn't take into account Day 1 of the current Month: function getYesterday () { var t:Date = new Date (); var daysBack:Number = 1; var today:Date = new Date (t.getFullYear (), t.getMonth (), t.getDate () - daysBack); return (today.getDate ()); } cheers micha ___ 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
Re: [Flashcoders] How to find yesterday?
THANK YOU!! 2007/3/27, Michael Stuhr [EMAIL PROTECTED]: [EMAIL PROTECTED] schrieb: Is this simple? cur_day = new Date(); //trace(cur_day.getDate()); Var1=cur_day.getDate()-1;//27 trace(var1);//26 the above doesn't take into account Day 1 of the current Month: function getYesterday () { var t:Date = new Date (); var daysBack:Number = 1; var today:Date = new Date (t.getFullYear (), t.getMonth (), t.getDate () - daysBack); return (today.getDate ()); } cheers micha ___ 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
Re: [Flashcoders] How to find yesterday?
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
Re: [Flashcoders] How to find yesterday?
On 3/27/07, natalia Vikhtinskaya [EMAIL PROTECTED] wrote: 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 oops, didn't read properly: function getYesterday () { var t:Date = new Date (); var daysBack:Number = 1; var today:Date = new Date (t.getFullYear (), t.getMonth (), t.getDate () - daysBack); return (today); } should doit micha ___ 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