RE: [PHP] PHP Schedule
| From: | Jason Murray | Date: | Mon, 15 Jan 2001 00:57:58 +0000 |
| Subject: | RE: [PHP] PHP Schedule | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-34521@lists.php.net to get a copy of this message | ||
> I have to write a schedule program, for which I need the following:
> I have to calculate the date from a given week and vice versa.
>
> For example: the week number is 26, and I have to know which
> was its first day (the date, not the day of the week), say 06/21/2001,
> monday.
If the week number is 26, then thats 26 x 7 = 182 days into the year.
$unixtime = mktime(0, 0, 1, 1, 182, 2001); // January 182, 2001.
$dayofweek = date("l", $unixtime);
Somehow I think that this isn't *quite* what you were getting at,
though - but maybe it'll help.
Jason
(since this was a PHP solution, I've taken the Debian ml off the response)
--
Jason Murray
jasonm@melbourneit.com.au
Web Design Team, Melbourne IT
Fetch the comfy chair!