From @jasonwilliams in https://github.com/tc39/proposal-temporal/pull/366:
Do we want to give more detail here on what the string should/should not be?
Is it just an ISO 8601 string? the output from Date() also?
See the format described in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString. (Although note it was implementation-dependent before ES2018.)
@gibson042 has done a lot of work in this area, and is the one who wrote the new spec for Date.prototype.toString. He attempted to do a similar thing with Date.parse, but that failed at plenary because all the browsers had different behavior and the implementations didn't want to change.
I would not require acceptance of Date.prototype.toString output, which is nonstandard outside ECMAScript and includes implementation-defined contents after the UTC offset, and is not even necessarily accepted by legacy Date.parse (which violates a "should" requirement in the spec, but is nonetheless web reality). The interchange-friendly format is available via Date.prototype.toISOString, and that should be enough.
Agreed @gibson042 we should have a cookbook example showing how to do this, as i imagine a common question will be "how to switch between the old and the new".
We have the cookbook example now, so closing this.
Most helpful comment
I would not require acceptance of
Date.prototype.toStringoutput, which is nonstandard outside ECMAScript and includes implementation-defined contents after the UTC offset, and is not even necessarily accepted by legacyDate.parse(which violates a "should" requirement in the spec, but is nonetheless web reality). The interchange-friendly format is available viaDate.prototype.toISOString, and that should be enough.