note 120953 added to datetime.setdate

From: Date: Fri, 07 Apr 2017 20:00:23 +0000
Subject: note 120953 added to datetime.setdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-209009@lists.php.net to get a copy of this message
Indjeto: You creating the datetime object with the first day of the month you are currently in when you initialize the object. Then you reset the date to the date you entered. Then you output, which is the day you entered because thats what you set it to. If you want to see the result you are assumed to be expecting you should not run the setDate() method. ---- Server IP: 72.52.91.14 Probable Submitter: 2603:300a:2106:6f00:fd3b:4b13:bea9:50f9 ---- Manual Page -- http://php.net/manual/en/datetime.setdate.php Edit -- https://master.php.net/note/edit/120953 Del: integrated -- https://master.php.net/note/delete/120953/integrated Del: useless -- https://master.php.net/note/delete/120953/useless Del: bad code -- https://master.php.net/note/delete/120953/bad+code Del: spam -- https://master.php.net/note/delete/120953/spam Del: non-english -- https://master.php.net/note/delete/120953/non-english Del: in docs -- https://master.php.net/note/delete/120953/in+docs Del: other reasons-- https://master.php.net/note/delete/120953 Reject -- https://master.php.net/note/reject/120953 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#209009) next »