On Fri, 26 Sep 2003, Flavio S. Glock wrote:

> Dave Rolsky wrote:
> >
> > On Fri, 26 Sep 2003, Flavio S. Glock wrote:
> >
> > > I think this is wrong, because the RD day is an absolute
> > > time and should only change at "midnight", whatever
> > > calendar module you use.
> > >
> > > year/month/day should change, but RD must stay synchronized
> > > with DateTime.
> >
> > Yes.  Anything else is broken behavior.  We should probably add this to
> > the calendar module dev docs.  How should it be phrased?
>
> How about:
>
> http://datetime.perl.org/developer/calendar.html
>
> Converting Between Calendars
>
>   [...]
>   Rata Die datetimes follow the UTC timescale.
>   Even in calendars in which the day changes at sunset,
>   the RD day still changes at midnight.

I added this to the calendar docs.

> Event Calculations
>
>   Modules that calculate events should return results
>   using the same class, time zone and locale as the
>   argument:
>
>     $dt2 = $eclipse->next( $dt1 );
>
>   The easiest way to implement this is to calculate a
>   DateTime::Duration, and then return
>   C<argument + duration>.
>
>   Note that if you feed a floating time to a module
>   that makes calculations using UTC, the result
>   will be a floating time that is only valid in
>   the UTC time zone. Most astronomical calculations
>   are in this category, such as sunrise, sunset,
>   and moon position.

I made a new document for DateTime::Event modules with this text.


-dave

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

Reply via email to