Skip to content

Add validity bounds to the TzOffset API and support for iteration over TzOffsets#199

Open
gharveymn wants to merge 1 commit intochronotope:mainfrom
gharveymn:tzoffset-validity-period
Open

Add validity bounds to the TzOffset API and support for iteration over TzOffsets#199
gharveymn wants to merge 1 commit intochronotope:mainfrom
gharveymn:tzoffset-validity-period

Conversation

@gharveymn
Copy link

Motivation: Certain event driven programs require scheduling based on changes to the offset which is active for a given timezone.

The changes here essentially turn TzOffset into a cursor over the offsets for a given timezone.

Also, add support for iteration over `TzOffset`s.
Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too invasive for a niche use case.

Is there API we could offer that would allow you to implement this outside this crate?

@robertbastian
Copy link
Contributor

I think this is a useful API, I was looking for something like it as well. Getting the next transition is a common TZDB API:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants