| 
	
 | 
 Posted by jferree on 10/03/06 11:38 
Norman Peelman wrote: 
> <jferree@gmail.com> wrote in message 
> news:1159828613.659706.301710@h48g2000cwc.googlegroups.com... 
> > If given a date such as 
> > 
> > 12-05-2005 
> > 
> > How can I find the closest Friday which would be 
> > 12-02-2005 
> > 
> > Thanks for any help 
> > 
> > Jim 
> > 
> 
> $timestamp = mktime(0,0,0,$month,$day,$year); 
> $lastFriday = date("m-d-Y",strtotime("last Friday",$timestamp)); 
> 
> Norm 
> www.php.net 
 
Thanks Norm, 
I had tried the second line but could not get it to work because I did 
not have a properly formatted date. 
 
That was easy!     :) 
 
Jim
 
[Back to original message] 
 |