note 103206 added to datetime.formats.relative

From: Date: Thu, 31 Mar 2011 18:50:57 +0000
Subject: note 103206 added to datetime.formats.relative
Groups: php.notes 
Request: Send a blank email to php-notes+get-178388@lists.php.net to get a copy of this message
Month skipping has issues with number of days in the month. '+1 month' may move to the following month if the next month has less days than the current: <?php print date('d M Y H:i:s', strtotime('+1 month', strtotime('Thu Mar 31 19:50:41 IST 2011'))); ?> Prints: 01 May 2011 19:50:41 But with 'last day of +1 month' the result is different: <?php print date('d M Y H:i:s', strtotime('last day of +1 month', strtotime('Thu Mar 31 19:50:41 IST 2011'))); ?> Prints: 30 Apr 2011 19:50:41 (PHP 5.3.3) ---- Server IP: 208.69.120.55 Probable Submitter: 79.177.5.3 ---- Manual Page -- http://www.php.net/manual/en/datetime.formats.relative.php Edit -- https://master.php.net/note/edit/103206 Del: integrated -- https://master.php.net/note/delete/103206/integrated Del: useless -- https://master.php.net/note/delete/103206/useless Del: bad code -- https://master.php.net/note/delete/103206/bad+code Del: spam -- https://master.php.net/note/delete/103206/spam Del: non-english -- https://master.php.net/note/delete/103206/non-english Del: in docs -- https://master.php.net/note/delete/103206/in+docs Del: other reasons-- https://master.php.net/note/delete/103206 Reject -- https://master.php.net/note/reject/103206 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178388) next »