/ Published in: PHP
URL: http://stackoverflow.com/questions/388673/php-date-calculation
Calculate date time difference
Expand |
Embed | Plain Text
/** * Calculates the differences between two date * * @param date $date1 * @param date $date2 * @return array */ function dateDifference($date1, $date2) { return array ( "seconds_total" => $diff_secs, ); }
Comments
Subscribe to comments
You need to login to post a comment.

Warning: date_diff() expects parameter 1 to be DateTime, string given in /x/y/z/t.php on line 388
I think this is related with php version (got this warning in php 5.3.9)
Any suggestion?