// Check if it's a Monday. If no, add enough to the date
// to make it to next monday. That will give us the beginning
// of the first week of the year.
$date_num = ((8 - date ("w", $start_date)) % 7);
// Now, add the number of weeks minus one to $date_num
// and find the beginning of the week we're looking for
echo "Week $week of 2005 starts with " . $begin_week_str . "\n";
echo "According to the system, $begin_week_str is in week #" . date ("W", $begin_week) . " of 2005\n";
// Now, find the Friday of that week.
$end_week = $begin_week + 345600;
$end_week_str = date ("D F d, Y", $end_week);
echo "Week $week of 2005 ends with $end_week_str\n";
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.