Difference between two dates in months?
| From: | Aaron Gould | Date: | Tue, 24 Feb 2004 20:33:10 +0000 |
| Subject: | Difference between two dates in months? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10910@lists.php.net to get a copy of this message | ||
I use the PEAR Date class for just about all of my date calculations. One feature I can't find though, is getting the difference between two dates -- in months.
So if I have these two dates: 2004-01-01 and 2002-04-01, I want "21" returned, as there are 21 months between those two dates.
Am I missing an obvious feature of the Date class, or is this not available?