Skip to content

Instantly share code, notes, and snippets.

@nnarhinen
Created October 5, 2010 11:06
Show Gist options
  • Save nnarhinen/611363 to your computer and use it in GitHub Desktop.
Save nnarhinen/611363 to your computer and use it in GitHub Desktop.
<?php
$start = new DateTime();
$end = new DateTime("+1 month");
echo $end->setTime(0,0,0)->diff($start->setTime(0,0,0))->format("%d");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment