note 108760 added to function.strtotime

From: Date: Wed, 23 May 2012 14:29:05 +0000
Subject: note 108760 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-188160@lists.php.net to get a copy of this message
It seems as if +1 month is checking if the following month has the same amount of days as the day you are adding a month to. So for 2012-01-31, it first checks if 2012-02-31 exist, if it does then that would be the one month added. If not then it just adds 31 days and thats why we get 2012-03-03 as a result. This is why when you start with 2012-02-01 +1month equals 2012-02-01. Even though that time span is only 28 days ---- Server IP: 64.71.164.2 Probable Submitter: 12.51.231.26 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/108760 Del: integrated -- https://master.php.net/note/delete/108760/integrated Del: useless -- https://master.php.net/note/delete/108760/useless Del: bad code -- https://master.php.net/note/delete/108760/bad+code Del: spam -- https://master.php.net/note/delete/108760/spam Del: non-english -- https://master.php.net/note/delete/108760/non-english Del: in docs -- https://master.php.net/note/delete/108760/in+docs Del: other reasons-- https://master.php.net/note/delete/108760 Reject -- https://master.php.net/note/reject/108760 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188160) next »