Skip to content

Adding zero #4

@mattBrzezinski

Description

@mattBrzezinski

When adding TimePeriods of zero we can end up with INVALID LaxZonedDateTime instances rather than returning instance we are given:

julia> using LaxZonedDateTimes, TimeZones, Base.Dates

julia> lzdt = LaxZonedDateTime(DateTime(2015,3,8,2), tz"America/Winnipeg")
2015-03-08T02:00:00-DNE

julia> lzdt + Hour(1)
INVALID

julia> lzdt + Day(1)
2015-03-09T02:00:00-05:00

julia> lzdt + Hour(0) # Should just be `2015-03-08T02:00:00-DNE`
INVALID

julia> lzdt + Day(0)
2015-03-08T02:00:00-DNE

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