Re: Conversion between dates and weeknumbers
| From: | Michel Groenenstijn | Date: | Sat, 24 Mar 2001 09:56:06 +0000 |
| Subject: | Re: Conversion between dates and weeknumbers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45419@lists.php.net to get a copy of this message | ||
Hello!
I don't think that's the solution to my problem. I have a weeknumber, and I
need the dates of the days in that week. With strftime gives the weeknumber
for a certain date; its a bit clumsy to check all dates in a year to see if
the happen to fall in the week I need :). Any other solutions?
I don't know how to use the PEAR/Date/Calc.php solution; can't find that php
file anywhere...
Anybody?
Thanks,
Michel
Jennifer Woodhead wrote:
> I think you can do it using
> strftime
>
> %V - The ISO 8601:1988 week number of the current year as a decimal number,
> range 01 to 53, where week 1 is the first week that has at least 4 days in
> the current year, and with Monday as the first day of the week.
>
> %W - week number of the current year as a decimal number, starting with the
> first Monday as the first day of the first week
>
> -----Original Message-----
> From: Yasuo Ohgaki [mailto:yohgaki@hotmial.com]
> Sent: 20 March 2001 09:03
> To: php-general@lists.php.net
> Subject: Re: [PHP] Conversion between dates and weeknumbers
>
> How about use PEAR/Date/Calc.php?
>
> Regards,
> --
> Yasuo Ohgaki
>
> "Michel Groenenstijn" <scyl@catv9040.extern.kun.nl> wrote in message
> news:3AB7143A.1F79A07@catv9040.extern.kun.nl...
> > Hello everybody,
> >
> > I need to convert between dates and weeknumbers, with PHP. Converting a
> > given date to a weeknumber can be done with MySQL, but I don't know how
> > to go the other way around. I need a function like
> > get_dates_in_week($weeknumber). A function to convert between a date and
> > a weeknumber without using mysql would help too...
> >
> > Can anyone help?
> >
> > Thanx!
> > Michel
> >
> >
> > --
> > 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
> >
>
> --
> 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
>
> --
> 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