> 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
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to