> -----Original Message-----
> From: Ed Lazor [mailto:[EMAIL PROTECTED]]
> Sent: 29 May 2002 01:49
> Subject: [PHP] easy date question?
> How can I find out the date of the 3rd Tuesday of any given month?
> Thanks,

To get a timestamp value:

    $third_tues = strtotime('tue + 2 weeks', strtotime('1-may-2002'));

which you can then use date() to format however you want.

Of course, if you already have a timestamp for the first of the month you can use this 
in place of the second strtotime() call.



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
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