note 20693 added to function.date
| From: | mightye_ at _mightye dot chek dot com | Date: | Fri, 12 Apr 2002 15:35:36 +0000 |
| Subject: | note 20693 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29164@lists.php.net to get a copy of this message | ||
If you're highlighting the entire current week in a calendar display which starts on Sunday as
the first day of the week, it's useful to use the following as your week number:
date("W",$day-(date("w",$day)*86400))
That will give you a value where the first FULL week of the year is numbered 1, and the first
partial week of the year is labeled as the final partial week of the previous year (typically 52).
Using this, your highlighting across the end of December can be consistant with the beginning of
January.
--
http://www.php.net/manual/en/function.date.php
http://master.php.net/manage/user-notes.php?action=edit+20693
http://master.php.net/manage/user-notes.php?action=delete+20693
http://master.php.net/manage/user-notes.php?action=reject+20693