@date-fns/utc
Version:
UTC date utils
18 lines (17 loc) • 632 B
text/typescript
/**
* UTC date class. It maps getters and setters to corresponding UTC methods,
* forcing all calculations in the UTC time zone.
*
* Combined with date-fns, it allows using the class the same way as
* the original date class.
*
* This complete version provides not only getters, setters,
* and `getTimezoneOffset`, but also the formatter functions, mirroring
* all original `Date` functionality. Use this version when you need to format
* a string or in an environment you don't fully control (a library).
*
* For a minimal version, see `UTCDateMini`.
*/
export class UTCDate extends Date {
getTimezoneOffset(): 0;
}