note 105506 added to function.date
| From: | blinovvyacheslavATgmail dot com at osu1 dot php dot net | Date: | Tue, 23 Aug 2011 14:06:51 +0000 |
| Subject: | note 105506 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182674@lists.php.net to get a copy of this message | ||
It was oblivious and discouraging that it dont mentioned in docs. If you will use W to get week
number be aware:
first days of year can be in a week of previous year, and week number always has leading zero
<?php
echo date("YW", strtotime("2011-01-07")); // gives 201101
echo date("YW", strtotime("2011-01-01")); // gives 201152
echo date("YW", strtotime("2011-12-31")); // gives 201152 too
?>
so you can`t rely on number of week given from this function inside your program if you want to use
it for some logic
----
Server IP: 69.147.83.197
Probable Submitter: 62.141.113.50
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/105506
Del: integrated -- https://master.php.net/note/delete/105506/integrated
Del: useless -- https://master.php.net/note/delete/105506/useless
Del: bad code -- https://master.php.net/note/delete/105506/bad+code
Del: spam -- https://master.php.net/note/delete/105506/spam
Del: non-english -- https://master.php.net/note/delete/105506/non-english
Del: in docs -- https://master.php.net/note/delete/105506/in+docs
Del: other reasons-- https://master.php.net/note/delete/105506
Reject -- https://master.php.net/note/reject/105506
Search -- https://master.php.net/manage/user-notes.php