Re: Question about date calculations
| From: | Matijn Woudt | Date: | Sun, 01 Jan 2012 22:52:46 +0000 |
| Subject: | Re: Question about date calculations | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316151@lists.php.net to get a copy of this message | ||
On Fri, Dec 30, 2011 at 5:33 PM, Eric Lommatsch <ericl@pivotaldata.net> wrote:
>
> When I try this method:
>
>
>
> $interval = $dteStartDate[$intCnt]->diff($dteEndDate[$intCnt]); I get the following error
> when I run the page:
>
> " Fatal error : Call to undefined method DateTime::diff() in /var/www/evalHomeLime.php on
> line 254"
>
Just for the record: As noted on the manpage [1], your PHP version
needs to be >= 5.3.0.
Cheers,
Matijn
[1] http://www.php.net/manual/en/datetime.diff.php