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

Parsing APIs #1

Closed
jzaefferer opened this issue Feb 16, 2015 · 4 comments
Closed

Parsing APIs #1

jzaefferer opened this issue Feb 16, 2015 · 4 comments

Comments

@jzaefferer
Copy link

jzaefferer commented Feb 16, 2015

2020 Update: See #342 for further discussion.

Currently the spec has no APIs for parsing dates or numbers. Supposedly the response used to be "use a datepicker" when asking about date parsing. I'm wondering if that changed.

@srl295
Copy link
Member

srl295 commented Feb 16, 2015

@jzaefferer I think the main issues may be:

  • triaging for the 1st edition.
  • parsing is not usually 1:1 (unlike format) therefore
    • parsing can require control of leniency
  • from a UI point of view ( browserland ) a datepicker widget is often a better interface (less error prone) than parsing a box of free text, however, this of course does not handle all use cases.

In any event, I think that, unlike the way ICU currently does it with a symmetric object (input+output), it would be better to have a separate object for parsing rather than add a "parse()" function on the date or number objects.

@zbraniecki
Copy link
Member

I agree with @srl295. Parsing dates especially feels like a very risky task with extremely high barrier for good user experience. Unless we can provide something that works for 95% cases, developers who will decide to use it will have to manually parse it anyway for when Intl API fails, and will probably come up with their own solution anyway. I'd leave it to specialized libraries.

@caridy
Copy link
Contributor

caridy commented Nov 6, 2015

Closing this issue by consensus, but if anyone wants to go for it, we are open to evaluate the concrete proposal.

@caridy caridy closed this as completed Nov 6, 2015
@jungshik
Copy link

JFYI, v8 has v8Parse, but we may get rid of it soon pending the stat collection on it usage.

/cc @littledan, @Cira, @jungshik

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

No branches or pull requests

5 participants