Rick Measham wrote: > > $working_hours = new DateTime::Business::Week( > days => [1 .. 5], > start => {hour => 9, minute => 0}, > end => {hour => 17, minute => 30} > ); > > and, for those with more complex weeks: [...]
See also: DateTime::Format::ICal -- t/04recurrence.t for some ideas on how to use the "ICal" parser/formatter - it makes it easier to read/write recurrences from a file or database. (reading the rfc2445 docs, I guess that ICal also supports spansets, but I'm not sure) About the API: when you said "It could then be extended ..." you mean another module, right? I think you are defining a lot of functionality, beyond "::Week". - Flavio S. Glock