Dave Rolsky said: > DT already supports both of these, doesn't it? >
DateTime.pm only supports the ISO standard. It is missing iCal's optional "week start day" specification ("WKST"). WKST has two parts: the algorithm specification, and the day name. There are two different algorithms for calculating when the "first week" starts: 'mo' - first week, starting in "monday", with the most days in this year/month (this is the default) '1mo' - first "monday" of this year/month If you used 1-7 as the week start day, you'd need an extra parameter to select the algorithm type. > This also might be good for the core. Actually, the weekly calendar is so different, we could have a "DateTime::Week" object, with it's own constructors, accessors and date math. For example, if you added one year to a DT::Week, it would give the date one year later, but in the same week and week day. But yes, I'd like to have these in the core. - Flavio S. Glock