Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDate #816
Comments
lukewestby
added
the
meta
label
Jan 20, 2017
This was referenced Jan 20, 2017
elm
locked and limited conversation to collaborators
Jan 20, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jul 6, 2017
Member
I changed Date.fromString to Date.fromIso8601 which verifies the format and cannot crash.
I also added Date.toIso8601 which always produces a String in the same format.
I believe the issue with browsers adding in time zone information can be resolved if these two functions are moved into Time which does not care about time zones. Then perhaps Date should move out of core, either to elm-lang/date or a community package, until we can do something like this.
|
I changed I also added I believe the issue with browsers adding in time zone information can be resolved if these two functions are moved into |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
May 22, 2018
Member
I think the problems with JS Date are unsolvable, so I made https://github.com/elm-lang/time to do things in a reasonable way. Should not have any of these problems anymore.
|
I think the problems with JS |
lukewestby commentedJan 20, 2017
•
edited by evancz
Edited 1 time
-
evancz
edited Jul 6, 2017 (most recent)
There seem to be a few issues popping up around Dates including some duplicates of previously closed issues, so lets track them here
new Date()Date.fromTimetoString dateresults in a string that is not consistently parseable as a DateDate.fromStringinteracts with browser envSome summarizing of things that Dates need to resolve issues:
Times)toString