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.parse cannot return an abrupt completion when called with a String value #1169

Closed
anba opened this Issue Apr 12, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@anba
Contributor

anba commented Apr 12, 2018

https://tc39.github.io/ecma262/#sec-date-value, step 4.b.ii

  1. Let tv be the result of parsing v as a date, in exactly the same manner as for the parse method (20.3.3.2). If the parse resulted in an abrupt completion, tv is the Completion Record.
  2. ReturnIfAbrupt(tv).

should instead assert that calling Date.parse will never result in an abrupt completion:

  1. Assert: The next step never returns an abrupt completion because v is a String value.
  2. Let tv be the result of parsing v as a date, in exactly the same manner as for the parse method (20.3.3.2).
@littledan

This comment has been minimized.

Show comment
Hide comment
@littledan

littledan Apr 12, 2018

Member

Looks right to me. Anyone want to make a patch?

Member

littledan commented Apr 12, 2018

Looks right to me. Anyone want to make a patch?

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