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

Date.fromString calls strongly discouraged Javascript code #701

Closed
mariosangiorgio opened this Issue Aug 27, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@mariosangiorgio
Contributor

mariosangiorgio commented Aug 27, 2016

I am working on some code that uses dates. When I looked at the documentation of Date.fromString I didn't find any indication about the format used so I had a look at the source code.

I figured out it used the native Javascript Date. Reading the documentation on Mozilla's website I found this worrying note:

parsing of date strings with the Date constructor (and Date.parse, they are equivalent) is strongly discouraged due to browser differences and inconsistencies.

Has anyone looked into what these inconsistencies are?

I think we should do one of the following things:

  • investigate what the inconsistencies are and document them on the module documentation. Hardly ideal, but at least users are going to be aware of possible issues
  • write a pure elm parser, with a well defined accepted format
  • remove the function entirely

What do you think?

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Aug 27, 2016

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Aug 27, 2016

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Aug 29, 2016

Member

This is a duplicate of #632, follow along there.

Member

evancz commented Aug 29, 2016

This is a duplicate of #632, follow along there.

@evancz evancz closed this Aug 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment