Skip to content

Consider revising :first and :last argument names in ZonedDateTime constructor #6

@mattBrzezinski

Description

@mattBrzezinski

The names make sense for Ambiguous ZonedDateTimes, i.e. the hour when the clocks go back in Spring and there is a duplicate hour in two timezones. There, you either take the first or last timezone.

For NonExistent ZonedDateTimes, i.e. the "nonexistent hour" when the clocks go forward in Autumn, the logic can be a confusing if you think about it too much, i.e.

if first: Take the _last_ datetime to occur in the timezone preceding the DST transition.
if last: Take the _first_ datetime to occur in the timezone after the DST transition.

maybe there are better terms we could use?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions