Eugene van der Pijll wrote:
>Or: instead of making observance_for_datetime a method in the standard
>TZ distribution, make a separate distribution, with class
>DT::TZ::Observance (or maybe somewhere in DT::Util? DT::Ev?). 

Yes, that's probably better for the heavyweight approach.  Still need
a lightweight version to go in the timezone classes themselves.
Presumably we'll go for the lightest form then, just dealing with the
transition instants.

>DT::TZ would than have to implement just a single method to get at the
>raw data; for example DT::TZ->get_transition( $dt ), which returns the
>first transition after $dt, or the first transition if no $dt is passed.

I definitely want a backward iterator.  ->prev in DT::TZ::O will require
it, of course.  This comes back to the interface issues already discussed
for the boundary-based interface.

-zefram

Reply via email to