Skip to content

Instantly share code, notes, and snippets.

@turtlix
Created May 13, 2016 00:59
Show Gist options
  • Save turtlix/787206abb27dfa1826202a82e56de385 to your computer and use it in GitHub Desktop.
Save turtlix/787206abb27dfa1826202a82e56de385 to your computer and use it in GitHub Desktop.
<?php
$dt_end = new DateTime('December 3, 2016 2:00 PM');
$remain = $dt_end->diff(new DateTime());
echo $remain->d . ' days and ' . $remain->h . ' hours';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment