-
Notifications
You must be signed in to change notification settings - Fork 157
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
TODO: Determine value of valueOf #25
Comments
FYI console.log output is not something for specs to decide; it's for individual devtools teams to work through in order to create a UI they feel is best for their users. |
Good to know. Though I must say, it's such a P.I.T.A. of a problem today when the console.log(new Date());
// Chrome:
//=> Sat Jul 08 2017 16:18:31 GMT-0700 (Pacific Daylight Time)
// FireFox:
//=> Date 2017-07-08T23:18:31.674Z Chrome output matches I suppose there's nothing we can do in this spec to deal with that, but it does come up again and again on StackOverflow. Was hoping to at least have a suggested output format for implementers. Would that be allowed? |
Maybe as part of https://console.spec.whatwg.org/ , but definitely not as part of ECMAScript. |
Yep. this exactly. Thanks for the link. :) Ok, so ignoring the console log output, the rest of this issue still stands. |
I'm most concerned about |
@maggiepint - good point. Need to think about that one more... |
@maggiepint In our datetime classes, we resisted providing comparison/equality operators that implicitly convert to help avoid human error. The programmer has to explicitly write what they want. It would be akin to requiring something like this: Verify two zoned instants refer to the same point in UTC:
Verify the local plain datetimes are the same / throw away the offset/zone:
(We opted to make both functions return the equivalent of |
It would also be good to define what the JSON output should be for each type. |
Decided in #74 that we will not have a |
We should decide what
.toString()
and.valueOf()
return for each object type.We should also consider the output ofconsole.log
for each object type, and whether it is the same or different than thetoString
output.The text was updated successfully, but these errors were encountered: