On Wed, 15 Jun 2005, I wrote:
P.S. Dave, Here's quick hacks of the two functions I'd like to see added ... there's no checking that we really have a duration or anything like that...
Dave replied:
I really don't want to clutter up the DateTime API any more than it already is. I think we need some sort of mixin or wrapper namespace like we've talked about before.
OK, I've been meaning to do this for a while now. This is a prototype of DateTime::Decorated. It contains a script ./dectest.pl which will demonstrate the use of DateTime::Decorated. It also contains a decoration: DateTime::Decorated::OrderedMath which for the moment only includes add_lsb and add_msb.
Before I go any further on any of this, I'd love feedback and comments. Are people happy with the namespace and interface of DateTime::Decorated?
Using this, it will be easy to create DateTime::Decorated::ISO8601 for example, which would mix 'parse' and 'format' methods into DateTime by utilizing DateTime::Format::ISO8601.
Cheers! Rick Measham