What is the simplest way to do it in PHP ?
I want the date of the Monday of a given week number of a year (example : week number 3 of 2009)
EDIT : If you use Linux only machines, use cletus' solution, however I am looking for something that can work on Windows AND Linux.
Yet another solution:
<?php $week = 3; $year = 2009; $timestamp = mktime( 0, 0, 0, 1, 1, $year ) + ( $week * 7 * 24 * 60 * 60 ); $timestamp_for_monday = $timestamp - 86400 * ( date( 'N', $timestamp ) - 1 ); $date_for_monday = date( 'Y-m-d', $timestamp_for_monday ); ?>