Re: SOS - How to get the number of a week
| From: | Monte Ohrt | Date: | Thu, 26 Oct 2000 16:50:55 +0000 |
| Subject: | Re: SOS - How to get the number of a week | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22165@lists.php.net to get a copy of this message | ||
Hi Alain,
Date_Calc might help you here. You can get the first and last days of a
given week, although not with the week number. You'll first need a date
within the week. You can also configure the beginning weekday.
http://www.phpinsider.com/php/code/Date_Calc/
Alain ROMERO wrote:
>
> I give an SOS to the world ...
>
> How can I get the fisrt and last days for a given week :
> Week = 40 of 2000 ===> first = monday 10/2/2000 last Sunday 10/8/2000
>
> It's more difficult when the week is beetween december and january or
> when there are 53 weeks a year!
> 12/31/2001 is first day of week 1 - 2002
> 12/30/2002 is first day of week 1 - 2003
>
> Some years have 53 weeks (when ?).
>
> I hope someone can help me !!!!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/