Skip to content

Instantly share code, notes, and snippets.

@pietvanzoen
Last active December 25, 2015 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pietvanzoen/6942323 to your computer and use it in GitHub Desktop.
Save pietvanzoen/6942323 to your computer and use it in GitHub Desktop.
Time Cop
// Returns TRUE when time() is greater than $datatime_string
function time_cop($datetime_string = '3/27/2013 6AM')
{
if (empty($datetime_string)) {
return FALSE;
}
return time() >= strtotime($datetime_string);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment