Skip to content

DateTime.Year is out of range #19

Description

@themattchan

Given the following underlying DateTime objects, I get the following invalid RFC3339Strings:

 (DateTime (Date (Year 97147) December (Day 26)) (Time (Hour 3) (Minute 36) (Second 4) (Millisecond 729)))

97147-12-26T03:36:04.729569335Z
(DateTime (Date (Year -114165) February (Day 12)) (Time (Hour 16) (Minute 32) (Second 8) (Millisecond 241)))

000-114165-02-12T16:32:08.241663734Z

The problem is while RFC3339 expects a year in the inclusive range 0-9999, the range for DateTime.Year is

instance boundedYear :: Bounded Year where
  bottom = Year (-271820)
  top = Year 275759

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions