Hi Here is a messy solution, but I think it does what you want using strtotime() (well worth looking up in the manual :)
<? $weeks = 30; $year = date("Y"); $monday1 = strtotime("1 monday",strtotime("1/1/".$year)); //get unix time of first monday of this year $monday = intval(date("d",$monday1)); //get the day of the month if($monday != 1): $week1 = strtotime("-1 week",$monday1); //first week started last year else: $week1 = $monday1; //neat this year started on a monday endif; $start = strtotime($weeks." monday",$week1); //get unix time of start * the number of weeks $end = strtotime("next sunday",$start); //get unix time of end //print them out as dates echo "Week $weeks start date = ".date("d/m/Y",$start)." end date = ".date("d/m/Y",$end)."<br>"; ?> Tom At 02:55 AM 16/06/2002 +0300, Rosen wrote: >Hi, >how can I determine dates (start & end ) in one week. >I.e. 30th week is between 22.07.2002 and 28.07.2002 . > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php