Hi,
When any Temporal object has its valueOf function called, it intentionally throws a TypeError with a specific message. For example with Temporal.PlainDate:
"Do not use Temporal.PlainDate.prototype.valueOf; use Temporal.PlainData.prototype.compare for comparison."
However, there's a mistake in this message. It says Temporal.PlainDate.prototype.compare, but that doesn't exist. The correct function is actually Temporal.PlainDate.compare. This caused me some confusion.
Example:
Temporal.PlainDate.from("2025-05-19").compare -> undefined
Temporal.PlainDate.compare -> [Function: compare]
The message is generated by this code:
https://github.com/v8/v8/blob/main/src/builtins/builtins-temporal.cc#L113
Can I fix this?