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

Reply via email to