newbie: help with date arithmetic
| From: | ROBERT MCPEAK | Date: | Tue, 12 Nov 2002 15:30:34 +0000 |
| Subject: | newbie: help with date arithmetic | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-124006@lists.php.net to get a copy of this message | ||
I'm trying to add/subract two dates. I think I need to use mktime() but I can't quite
figure out how.
I'd like to do something like this:
(2002-11-15)-(2002-11-10)=5
or
(2002-12-10)-(2002-11-10)=20
Obviously taking into account number of days in a given month.
Does somebody have some code handy that does this? Any help would be greatly appreciated!
Thanks.