Skip to content

Instantly share code, notes, and snippets.

@oshanz
Created March 11, 2014 10:01
Show Gist options
  • Select an option

  • Save oshanz/9482754 to your computer and use it in GitHub Desktop.

Select an option

Save oshanz/9482754 to your computer and use it in GitHub Desktop.
$from = $_GET['from'] . '-01';
$to = $_GET['to'];
$date = date_create_from_format('Y-m', $to);
$to = $to . '-' . cal_days_in_month(CAL_GREGORIAN, $date->format('m'), $date->format('Y'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment