Joshua Hoblitt schreef:
> When converting a DateTime::Duration month to days - how many days
> should it be considering equivalent too? 30? 30.4? 31?

If you want to do this, you have to take into account that a duration of
$x years is translated to 12*$x years internally. If your calendar has
no months, it should calculate the number of days to add as

    $delta_days + int( $delta_months * $DAYS_IN_YEAR/12 );

Problem with the Mayan calendar: it has no years either... But one of
the smaller counts (haab) is 365 days long, I believe. So that is
probably the Mayan idea of a year.

(As usual) I disagree with Dave: some people would find it useful to use
durations in any calendar, so why not implement them. As long as they
use days and years only, there is no problem. And if they try to add a
number of months to a Mayan date, they shouldn't complain about the
result.

Eugene

Reply via email to