note 121972 added to class.datetimeimmutable
| From: | taoufik dot oussama at gmail dot com | Date: | Mon, 04 Dec 2017 10:02:27 +0000 |
| Subject: | note 121972 added to class.datetimeimmutable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209307@lists.php.net to get a copy of this message | ||
Here's a simple example on how this class works :
// Create a DateTimeImmutable Object
$date = new DateTimeImmutable('2000-01-01');
// "Change" that object and assign it's value to a new variable
$date2 = $date->add(new DateInterval('P6M5DT24H'));
// Check out the content of the two variables
echo $date->format('Y-m-d') . "\n";
// 2000-01-01
echo $date2->format('Y-m-d') . "\n";
// 2000-07-07
----
Server IP: 208.43.231.9
Probable Submitter: 92.154.57.234
----
Manual Page -- http://php.net/manual/en/class.datetimeimmutable.php
Edit -- https://master.php.net/note/edit/121972
Del: integrated -- https://master.php.net/note/delete/121972/integrated
Del: useless -- https://master.php.net/note/delete/121972/useless
Del: bad code -- https://master.php.net/note/delete/121972/bad+code
Del: spam -- https://master.php.net/note/delete/121972/spam
Del: non-english -- https://master.php.net/note/delete/121972/non-english
Del: in docs -- https://master.php.net/note/delete/121972/in+docs
Del: other reasons-- https://master.php.net/note/delete/121972
Reject -- https://master.php.net/note/reject/121972
Search -- https://master.php.net/manage/user-notes.php