/ Published in: PHP
URL: http://mark.haktstudios.com/
A simple utility function to determine if today\\'s date is newer than then a given date. Good for checking expiration dates on data.
Expand |
Embed | Plain Text
/** * past_date($date) * * @param string $date - compares $date to $now to see if the date has passed. * @return boolean - returns true if provided $date is newer than $now * or false if $date is equal older than $now. */ function past_date($date) { // prepare working variables // evaluate. if( $date < $now ) return true; else return false; }
You need to login to post a comment.
