Posts by renatoneto • 171 points
1 post
-
17
votes6
answers59467
viewsA: How to calculate the difference between two dates?
Solution available as of PHP 5.3+ version: $date = new DateTime('2012-12-25 12:00:00'); $date2 = new DateTime('2013-12-25 12:00:00'); var_dump($date->diff($date2)); Exit: object(DateInterval)[3]…