Return to Snippet

Revision: 42419
at March 4, 2011 21:07 by takel


Initial Code
function week_range($date) {
  $ts = strtotime($date);
  $start = (date('w', $ts) == 0) ? $ts : strtotime('last monday', $ts);
  return array(date('d.m.Y', $start), date('d.m.Y', strtotime('next sunday', $start)));
}

Initial URL

                                

Initial Description

                                

Initial Title
week range - get the start and end date of  the week

Initial Tags

                                

Initial Language
PHP