note 103558 added to function.date
| From: | jon at jonwright dot ru | Date: | Wed, 20 Apr 2011 13:12:43 +0000 |
| Subject: | note 103558 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178990@lists.php.net to get a copy of this message | ||
"m Numeric representation of a month, with leading zeros"
Doesn't return a leading zero if you do the following.
echo '2011-'.(date('m')-2).'-01';
Assuming the month is this month (April) that should return:
// 2011-02-01
But instead of gives me:
// 2011-2-01
----
Server IP: 109.169.40.147
Probable Submitter: 195.206.198.50
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/103558
Del: integrated -- https://master.php.net/note/delete/103558/integrated
Del: useless -- https://master.php.net/note/delete/103558/useless
Del: bad code -- https://master.php.net/note/delete/103558/bad+code
Del: spam -- https://master.php.net/note/delete/103558/spam
Del: non-english -- https://master.php.net/note/delete/103558/non-english
Del: in docs -- https://master.php.net/note/delete/103558/in+docs
Del: other reasons-- https://master.php.net/note/delete/103558
Reject -- https://master.php.net/note/reject/103558
Search -- https://master.php.net/manage/user-notes.php