Re: Improve DateTime Class
| From: | Marco Pivetta | Date: | Mon, 10 Dec 2012 12:20:18 +0000 |
| Subject: | Re: Improve DateTime Class | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64217@lists.php.net to get a copy of this message | ||
Heya,
To me, an interval is well represented by DateInterval, while the
DateTime::modify() method looks more like a shortcut to it. Do you really
need the additional functionality? Shouldn't it be easier to $date->add(new
DateInterval('P15D')); ? It is also a better representation of an interval
to me...
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/