Matt Sisk wrote:
Dave Rolsky wrote:
Currently, the default when subtracting datetimes is
> to break down the duration into multiple parts, months,
> days, minutes, seconds, and nanoseconds.
From the months piece we can derive years, and from the
> days piece we can derive weeks.
Rick Measham responded:
Except, as Flavio points out, for non-gregorian calendars.
Perhaps the Calendar classes can offer 'unit conversion' methods
suitable for their particular idiom. Datetime could utilize these
conversion methods when found, otherwise default to 'Gregorian' style
calculations.
Yeah, let not the Aztec-Revolutionnary calendar users stop us from
finally having "number of a days between two days" that us in the
real world need, hopefully in DateTime without the need for an
extra module. (insert appropriate smiley here).
--
Eric Cholet