Skip to content
This repository was archived by the owner on Aug 23, 2018. It is now read-only.

Commit a892fdf

Browse files
committed
There are many problems with window.Date so stop relying on it.
There are just a bunch of problems with relying on the JS Date representation that I do not think can be solved with the JS foundation. For example, the ISO 8601 parsing is impure for dates. It appears that elm-community/elm-time provides similar functionality, but in a pure way that takes the IANA time zone database into account. The pure approach could be improved with something like https://github.com/evancz/time-zone-database-proposal down the line. Unclear if we should stick with this choice, but I would like to explore alternatives first.
1 parent fb79e28 commit a892fdf

File tree

4 files changed

+0
-317
lines changed

4 files changed

+0
-317
lines changed

elm.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"Bitwise",
1111
"Char",
1212
"Color",
13-
"Date",
1413
"Debug",
1514
"Dict",
1615
"Json.Decode",

src/Date.elm

Lines changed: 0 additions & 194 deletions
This file was deleted.

src/Elm/Kernel/Date.js

Lines changed: 0 additions & 117 deletions
This file was deleted.

src/Elm/Kernel/Debug.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ function _Debug_toString_dev(v)
146146

147147
if (type === 'object')
148148
{
149-
if (v instanceof Date)
150-
{
151-
return '<' + v.toString() + '>';
152-
}
153-
154149
if (v.elm_web_socket)
155150
{
156151
return '<websocket>';

0 commit comments

Comments
 (0)