canonicalDate :: Year -> Month -> Day -> Date
Constructs a date from year, month, and day components. The resulting date components may not be identical to the input values, as the date will be canonicalised according to the Gregorian calendar. For example, date values for the invalid date 2016-02-31 will be corrected to 2016-03-02.
Re-exports from Data.
A year component for a date.
The constructor is private as the
Year type is bounded to the range
-271820 to 275759, inclusive. The
toEnum function can be used to safely
acquire a year value from an integer.