Dave Rolsky wrote:
>However, something with some of the same info seems like a natural thing 
>to return from these methods.

So we'd have a DT::TZ::Observance class, with methods ->offset,
->short_name, ->is_dst, ->start_datetime, ->end_datetime.
$tz->observance_for_datetime($dt) would return one.

Re DT::Span (see other subthread), could have a ->span method that
loads DT::Span in all its glory and returns one.  Last-minute loading
would avoid bringing in so much mechanism when it's not being used.
Would have a distribution-time circular dependency issue though.

Would DT::TZ::Observance have methods ->next and ->prev?  Would make
walking the chain easy.  Raises questions of implementation strategy.
There's a general question of whether to cache the observance objects,
guarantee that the same ones are returned repeatedly, and so on.

If we're going to go the heavyweight route, this is the way to go.

-zefram

Reply via email to