note 102976 added to dateinterval.construct

From: Date: Thu, 17 Mar 2011 19:47:46 +0000
Subject: note 102976 added to dateinterval.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-177966@lists.php.net to get a copy of this message
Note that, while a DateInterval object has an $invert property, you cannot supply a negative directly to the constructor similar to specifying a negative in XSD ("-P1Y"). You will get an exception through if you do this. Instead you need to construct using a positive interval ("P1Y") and the specify the $invert property === 1. ---- Server IP: 64.71.164.2 Probable Submitter: 174.47.83.122 ---- Manual Page -- http://www.php.net/manual/en/dateinterval.construct.php Edit -- https://master.php.net/note/edit/102976 Del: integrated -- https://master.php.net/note/delete/102976/integrated Del: useless -- https://master.php.net/note/delete/102976/useless Del: bad code -- https://master.php.net/note/delete/102976/bad+code Del: spam -- https://master.php.net/note/delete/102976/spam Del: non-english -- https://master.php.net/note/delete/102976/non-english Del: in docs -- https://master.php.net/note/delete/102976/in+docs Del: other reasons-- https://master.php.net/note/delete/102976 Reject -- https://master.php.net/note/reject/102976 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#177966) next »