Re: RFC: DateTime::Util module for week-of-year and week-of-month

2005-02-01 Thread fglock
Flavio said: WKST has two parts: the algorithm specification, and the day name. I'm reading rfc2445 again. I'm wrong - WKST is just a normal weekday. There is one algorithm for year recurrences, and another one for monthly recurrences. - Flavio S. Glock

RFC: DateTime::Util module for week-of-year and week-of-month

2005-01-31 Thread fglock
There is some math in DateTime::Event::Recurrence that could be moved into a DateTime::Util::* module. Most of this math is related to week of year and week of month. I'd like to know if anyone can see some use for these subroutines outside of DateTime::Event::Recurrence: as_number( $datetime,

Re: RFC: DateTime::Util module for week-of-year and week-of-month

2005-01-31 Thread Dave Rolsky
On Mon, 31 Jan 2005 [EMAIL PROTECTED] wrote: Besides the common units, it can calculate 'year_weekly' and 'month_weekly' (week of year, week of month). DT already supports both of these, doesn't it? Check out the week(), week_year(), week_number(), and week_of_month() methods. The

Re: [rfc] DateTime::Util

2003-06-20 Thread Ben Bennett
Is this for taking an ISO week number and day of week and getting a month, day and year back? Dave, would it be possible to have a DT constructor for this? There is an accessor (week()) that does the reverse... For the ISO8601 module it would be nice to have this, although it is easy enough to

Re: [rfc] DateTime::Util

2003-06-20 Thread Joshua Hoblitt
On Fri, 20 Jun 2003, Ben Bennett wrote: Is this for taking an ISO week number and day of week and getting a month, day and year back? Dave, would it be possible to have a DT constructor for this? There is an accessor (week()) that does the reverse... For the ISO8601 module it would be

Re: [rfc] DateTime::Util

2003-06-20 Thread Dave Rolsky
On Fri, 20 Jun 2003, Joshua Hoblitt wrote: I can't think of any other usage which necessitates such a constructor. strptime needs it. Actually, if we're going to emulate the C library's strptime() then it's a _different_ week number. In fact, there's two different ones strptime() handles,