note 116647 added to function.date-sub

From: Date: Wed, 04 Feb 2015 11:14:11 +0000
Subject: note 116647 added to function.date-sub
Groups: php.notes 
Request: Send a blank email to php-notes+get-201588@lists.php.net to get a copy of this message
To glue to the OOP, it's better to use it with DateInterval::createFromDateString <?php $dateB = new DateTime('2020-12-20'); $dateA = $dateB->sub(DateInterval::createFromDateString('10 days')); ?> more detail here : <?php public static function createFromDateString ($time) {} ?> ---- Server IP: 72.52.91.14 Probable Submitter: 85.68.239.0 ---- Manual Page -- http://php.net/manual/en/function.date-sub.php Edit -- https://master.php.net/note/edit/116647 Del: integrated -- https://master.php.net/note/delete/116647/integrated Del: useless -- https://master.php.net/note/delete/116647/useless Del: bad code -- https://master.php.net/note/delete/116647/bad+code Del: spam -- https://master.php.net/note/delete/116647/spam Del: non-english -- https://master.php.net/note/delete/116647/non-english Del: in docs -- https://master.php.net/note/delete/116647/in+docs Del: other reasons-- https://master.php.net/note/delete/116647 Reject -- https://master.php.net/note/reject/116647 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201588) next »