3 ms·
What do you mean by ordinary functions? There has to be some value to represent a date or time that you pass around, so something somewhere has to return it. I
by olliej 5y ago
What do you mean by ordinary functions? There has to be some value to represent a date or time that you pass around, so something somewhere has to return it.
If your concern is `whatever(date)` vs `date.whatever()` then the issue you run into is pollution of the global object, which is bad, and frequently not possible due to naming collisions with existing sites (fun story, `let` required some exciting rules to deal with existing content using variables named `let`). Given an inability to add a million new functions to the global object your concise `whatever(date)` becomes `Temporal.whatever(date)`