> -----Original Message-----
> From: Elliot Tobin [mailto:[EMAIL PROTECTED]
> Sent: 21 July 2003 14:08
> 
> 
> I need a function to create the dates of previous Fridays, in
> 21-JUL-2003 format.  
> 
> I figure this has already been done, so I wanted to ask before I
> continued writing my own. 

Take a look at strtotime() -- http://www.php.net/strtotime

Some combination of words using the word 'Friday' should get you what you want -- try 
something like strtotime('last Friday') ('-2 Friday', '-3 Friday', etc.,) to see if it 
does what you want; if not, you may need something like 'last week Friday', '-2 weeks 
Friday', etc., or some other more complex combination.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to