Re: Help with Date
| From: | Jon Haworth | Date: | Mon, 21 Jul 2003 13:25:51 +0000 |
| Subject: | Re: Help with Date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156062@lists.php.net to get a copy of this message | ||
Hi Elliot,
> I need a function to create the dates of previous
> Fridays, in 21-JUL-2003 format.
It'll be different depending on what you want to happen if you pass a Friday
timestamp to the function, but it should be something like:
function friday($ts)
{
while (date("w", $ts) != 5)
$ts -= 86400;
return date("d-m-Y", $ts);
}
Cheers
Jon