On Fri, 10 Oct 2003, Flavio S. Glock wrote:

> That's true, because you are talking about a DateTime.pm method.
> ("delta_ymd" would make sense in other calendars, that don't have
> exactly 12 months.)
>
> However, if DT::Duration is given 'year' units, it should not
> automatically convert it to months, because I may want to use that
> information in a non-gregorian context.

Well, you might, but you can't ;)

Seriously, I think this idea that DateTime::Duration should work for other
calendars is bogus, and I've said so before.

There's simply too many possible ways for this to break, and while it
would be somewhat flexible, it wouldn't be flexible enough to work with
many odd calendars (like Discordian, Aztec, etc.).

> That is, if you move the year/month semantics to the calendar class,
> then DT::Duration can support (almost) any calendar.

No, it can only support some fraction of calendars, those that are lunar,
solar, or lunisolar.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to