purescript-contrib / purescript-formatters

Formatting and printing for numeric and date/time/interval values
Apache License 2.0
41 stars 29 forks source link

Issue formatting `bottom` for `Year` #49

Closed paulyoung closed 5 years ago

paulyoung commented 6 years ago

As mentioned in https://github.com/awakesecurity/purescript-precise-datetime/issues/32, I think this is probably because bottom for Year is negative: https://github.com/purescript/purescript-datetime/blob/ffdd94fa0c4ac5d89107b0437aece0556970dcef/src/Data/Date/Component.purs#L28

> import Data.Formatter.DateTime (FormatterCommand(..), format)
> import Data.List (fromFoldable)
> format (fromFoldable [ YearFull ]) bottom
"000-271820"
paulyoung commented 6 years ago

Possibly related to https://github.com/slamdata/purescript-formatters/issues/45