Update getTimezoneOffset JSDoc for clarity #57997
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Help Wanted
You can do this
Milestone
⚙ Compilation target
es5
⚙ Library
5.1.6
Missing / Incorrect Definition
getTimezoneOffset
In "/src/lib/es5.d.ts", in the Date interface, the JSDoc of getTimezoneOffset implies that the operation is "local time minus UTC time", but the actual operation performed is "UTC time minus local time".
Current JSDoc of getTimezoneOffset:
Suggestion based on the wording on the MDN and W3C documentations for getTimezoneOffset:
Sample Code
Documentation Link
MDN getTimezoneOffset
W3C getTimezoneOffset
The text was updated successfully, but these errors were encountered: