Hey guys, what's the most efficient way of finding an interval in days between two SQL-style dates (YYYY-MM-DD)? Basically I want a fast PHP equivalent of the SQL statement:
mysql> SELECT TO_DAYS('2000-08-20') - TO_DAYS('2000-08-10');
+-----------------------------------------------+
| TO_DAYS('2000-08-20') - TO_DAYS('2000-08-10') |
+-----------------------------------------------+
| 10 |
+-----------------------------------------------+
I figured mktime() might be the only way to go, but I was thinking perhaps PHP had a built-in function to do this also. Ideas?
Thanks,
Mike