note 20693 deleted from function.date by sniper
| From: | sniper@php.net | Date: | Sat, 11 Oct 2003 16:49:21 +0000 |
| Subject: | note 20693 deleted from function.date by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58251@lists.php.net to get a copy of this message | ||
Note Submitter: mightye_@_mightye(dot)org
----
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.