note 116265 added to class.dateinterval
| From: | Michael | Date: | Wed, 03 Dec 2014 16:00:05 +0000 |
| Subject: | note 116265 added to class.dateinterval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201057@lists.php.net to get a copy of this message | ||
To increase a time, use the add method. For example:
$thirty_minutes_from_now = new DateTime();
$thirty_minutes_from_now->sub(new DateInterval('PT30M'));
To decrease a time, use the diff method. For example:
$thirty_minutes_ago = new DateTime();
$thirty_minutes_ago->sub(new DateInterval('PT30M'));
----
Server IP: 72.52.91.14
Probable Submitter: 67.228.177.213
----
Manual Page -- http://php.net/manual/en/class.dateinterval.php
Edit -- https://master.php.net/note/edit/116265
Del: integrated -- https://master.php.net/note/delete/116265/integrated
Del: useless -- https://master.php.net/note/delete/116265/useless
Del: bad code -- https://master.php.net/note/delete/116265/bad+code
Del: spam -- https://master.php.net/note/delete/116265/spam
Del: non-english -- https://master.php.net/note/delete/116265/non-english
Del: in docs -- https://master.php.net/note/delete/116265/in+docs
Del: other reasons-- https://master.php.net/note/delete/116265
Reject -- https://master.php.net/note/reject/116265
Search -- https://master.php.net/manage/user-notes.php