Skip to content

Instantly share code, notes, and snippets.

@jibone
Created January 2, 2013 04:29
Show Gist options
  • Save jibone/4432198 to your computer and use it in GitHub Desktop.
Save jibone/4432198 to your computer and use it in GitHub Desktop.
count the number of days form today's date
<?php
$now = time() + 26888; // or your date as well
//$now2 = $now + 26888;
$your_date = strtotime("2013-01-14");
$datediff = $your_date - $now;
echo ceil($datediff/(60*60*24));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment