Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with toRFC3339String bottom #32

Open
paulyoung opened this issue Jul 24, 2018 · 3 comments
Open

Issue with toRFC3339String bottom #32

paulyoung opened this issue Jul 24, 2018 · 3 comments

Comments

@paulyoung
Copy link
Contributor

> toRFC3339String bottom
(RFC3339String "000-271820-01-01T00:00:00.0Z")

Possibly due to bottom for Year being negative:

https://github.com/purescript/purescript-datetime/blob/ffdd94fa0c4ac5d89107b0437aece0556970dcef/src/Data/Date/Component.purs#L28

@paulyoung
Copy link
Contributor Author

> import Data.PreciseDateTime.Internal (dateTimeFormatISO)
> import Data.Formatter.DateTime (format)
> format dateTimeFormatISO bottom
"000-271820-01-01T00:00:00"

@paulyoung
Copy link
Contributor Author

I think this might be an issue with purescript-formatters.

> import Data.PreciseDateTime.Internal (dateFormat)
> show dateFormat
"(YearFull : (Placeholder \"-\") : MonthTwoDigits : (Placeholder \"-\") : DayOfMonthTwoDigits : Nil)"
> format dateFormat bottom
"000-271820-01-01"

@paulyoung
Copy link
Contributor Author

> import Data.Formatter.DateTime (FormatterCommand(..))
> import Data.List (fromFoldable)
> format (fromFoldable [ YearFull ]) bottom
"000-271820"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant