Skip to content

Instantly share code, notes, and snippets.

@stormbreakers
Created February 23, 2016 09:27
Show Gist options
  • Select an option

  • Save stormbreakers/3c1693c93572326bd533 to your computer and use it in GitHub Desktop.

Select an option

Save stormbreakers/3c1693c93572326bd533 to your computer and use it in GitHub Desktop.
$FirstDay = date("Y-m-d", strtotime('today'));// today's date
$LastDay = date("Y-m-d", strtotime($FirstDay.' +6 day'));// +6 days date
echo $date = date("Y-m-d",strtotime('monday this week')).' To '.date("Y-m-d",strtotime("sunday this week"));
$FirstDay = date("Y-m-d", strtotime('monday this week'));// this monday's date
$LastDay = date("Y-m-d", strtotime('sunday this week'));// this sundays's date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment