-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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.UTC should return NaN with < 2 arguments #1318
Comments
I'll take a crack at this. :) |
... with < 2 arguments (??) |
Uhh yeah, title is wrong (and so is PR). @claudepache you rock. |
@bterlson Yes, I was wondering about this aspect when I compared behavior with Chrome. The PR is easy to fix. I'll await concensus before making fixes. |
Note: TC39 did not reach a consensus on this and may not have a further decision for a while (see whatwg/javascript#31). Still it seems worth changing to the implementation currently provided by the other browsers (return NaN for 0 or 1 argument). |
Agreed |
Agreed. |
Currently, the spec says this behavior is implementation defined. We have decided that means to default these parameters to zero. All other implementations simply return NaN. I think we should align if possible and update the spec to mandate this behavior. Are there compelling reasons to keep our current behavior? It'd be a compat break for UWP/etc. but this behavior doesn't seem particularly useful so hopefully it's not used...
See also whatwg/javascript#31
The text was updated successfully, but these errors were encountered: