MCPcopy
hub / github.com/date-fns/date-fns / tzComponents

Method tzComponents

pkgs/tz/src/date/index.js:69–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 //#region private
68
69 tzComponents() {
70 const offset = this.getTimezoneOffset();
71 const sign = offset > 0 ? "-" : "+";
72 const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, "0");
73 const minutes = String(Math.abs(offset) % 60).padStart(2, "0");
74 return [sign, hours, minutes];
75 }
76
77 //#endregion
78

Callers 2

toISOStringMethod · 0.95
toTimeStringMethod · 0.95

Calls 1

getTimezoneOffsetMethod · 0.45

Tested by

no test coverage detected