note 114217 added to dateinterval.format

From: Date: Sat, 25 Jan 2014 21:24:56 +0000
Subject: note 114217 added to dateinterval.format
Groups: php.notes 
Request: Send a blank email to php-notes+get-198346@lists.php.net to get a copy of this message
glavic, this does not eliminate the problem of "32 days", if you use your class for normalizing intervals of days, because the result will depend on the current month which is used for DateTime by default. And if that does not matter (because the interval is not that long) you don't have to call diff() to get the same recalculation: $DT=new DateTime('0000-01-01'); $DT->add($oInt); echo($DT->format('Y-m-d H:i:s')); ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/dateinterval.format.php Edit -- https://master.php.net/note/edit/114217 Del: integrated -- https://master.php.net/note/delete/114217/integrated Del: useless -- https://master.php.net/note/delete/114217/useless Del: bad code -- https://master.php.net/note/delete/114217/bad+code Del: spam -- https://master.php.net/note/delete/114217/spam Del: non-english -- https://master.php.net/note/delete/114217/non-english Del: in docs -- https://master.php.net/note/delete/114217/in+docs Del: other reasons-- https://master.php.net/note/delete/114217 Reject -- https://master.php.net/note/reject/114217 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198346) next »