Skip to content

Instantly share code, notes, and snippets.

@vo
Created June 4, 2011 19:08
Show Gist options
  • Save vo/1008214 to your computer and use it in GitHub Desktop.
Save vo/1008214 to your computer and use it in GitHub Desktop.
Compute number of days between dates
<?php
$birth = strtotime('1902-01-01');
$current = strtotime('2011-03-06');
$days = round(abs($current-$birth)/86400);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment