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 failed when tried to convert string that was obtained using toString on Date. #807

Closed
Wildsoft opened this Issue Jan 14, 2017 · 11 comments

Comments

Projects
None yet
3 participants
@Wildsoft

Wildsoft commented Jan 14, 2017

Error: Unable to parse '<Sat Jan 14 2017 17:06:24 GMT-0500 (Eastern Standard Time)>' as a date. Dates must be in the ISO 8601 format.

The same code worked well on Chrome but failed on Firefox (50.1.0 on Windows 8)

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Jan 14, 2017

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 Jan 14, 2017

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.

@Wildsoft

This comment has been minimized.

Show comment
Hide comment
@Wildsoft

Wildsoft Jan 14, 2017

IE 11 had the same issue

Wildsoft commented Jan 14, 2017

IE 11 had the same issue

@Wildsoft

This comment has been minimized.

Show comment
Hide comment
@Wildsoft

Wildsoft Jan 14, 2017

Here is a snippet of code that reproduce the issue:
addHistoryEntry : DestParty -> Date -> UserData -> UserData
addHistoryEntry destParty callDate userData =
let
dateStr = (toString callDate)
dateForVal = Date.fromString dateStr
dateStr2 = case dateForVal of
Ok _ -> dateStr
Err err -> "Got:"++ err
............................................................................................

Wildsoft commented Jan 14, 2017

Here is a snippet of code that reproduce the issue:
addHistoryEntry : DestParty -> Date -> UserData -> UserData
addHistoryEntry destParty callDate userData =
let
dateStr = (toString callDate)
dateForVal = Date.fromString dateStr
dateStr2 = case dateForVal of
Ok _ -> dateStr
Err err -> "Got:"++ err
............................................................................................

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jan 15, 2017

Contributor

Can you try to properly format your example code in the last comment using a Markdown code block?

Contributor

jvoigtlaender commented Jan 15, 2017

Can you try to properly format your example code in the last comment using a Markdown code block?

@Wildsoft

This comment has been minimized.

Show comment
Hide comment
@Wildsoft

Wildsoft Jan 15, 2017

Sure, I have recreate the issue with very small program. Its code is attached:
date_from_string.elm.txt

Wildsoft commented Jan 15, 2017

Sure, I have recreate the issue with very small program. Its code is attached:
date_from_string.elm.txt

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jan 15, 2017

Contributor

Look at how your comment (also the new one) looks on GitHub. No formatting, unreadable.

Contributor

jvoigtlaender commented Jan 15, 2017

Look at how your comment (also the new one) looks on GitHub. No formatting, unreadable.

@Wildsoft

This comment has been minimized.

Show comment
Hide comment
@Wildsoft

Wildsoft Jan 15, 2017

Can you please look at attached file?

Wildsoft commented Jan 15, 2017

Can you please look at attached file?

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jan 15, 2017

Contributor

Please open a new issue, with all relevant information in the first comment, in readable form. Our current conversation here will just make it more complicated to see what the problem is and to act on it.

Contributor

jvoigtlaender commented Jan 15, 2017

Please open a new issue, with all relevant information in the first comment, in readable form. Our current conversation here will just make it more complicated to see what the problem is and to act on it.

@Wildsoft

This comment has been minimized.

Show comment
Hide comment
@Wildsoft

Wildsoft commented Jan 15, 2017

Done

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jan 15, 2017

Contributor

@Wildsoft, please do take a look at https://github.com/elm-lang/core/issues/810#issue-200876297. I edited your comment there to put the code right there into it as a Markdown block (instead of a link only). This is how you should present examples like this in an issue if you want to make it easy for the maintainer to work with your issue (which you should want).

Contributor

jvoigtlaender commented Jan 15, 2017

@Wildsoft, please do take a look at https://github.com/elm-lang/core/issues/810#issue-200876297. I edited your comment there to put the code right there into it as a Markdown block (instead of a link only). This is how you should present examples like this in an issue if you want to make it easy for the maintainer to work with your issue (which you should want).

@Wildsoft

This comment has been minimized.

Show comment
Hide comment
@Wildsoft

Wildsoft Jan 15, 2017

@jvoigtlaender , sure, thanks for your help and patience

Wildsoft commented Jan 15, 2017

@jvoigtlaender , sure, thanks for your help and patience

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