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

Method getTimezoneOffset

pkgs/tz/src/date/mini.js:89–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87 }
88
89 getTimezoneOffset() {
90 const offset = -tzOffset(this.timeZone, this);
91 // Remove the seconds offset using `Math.floor` for negative UTC time zones
92 // and `Math.ceil` for positive UTC time zones.
93 return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
94 }
95
96 //#endregion
97

Callers 14

test.tsFile · 0.45
generateOffsetFunction · 0.45
getTzOffsetTransitionsFunction · 0.45
index.tsFile · 0.45
formatISOFunction · 0.45
test.tsFile · 0.45
formatRFC3339Function · 0.45
test.tsFile · 0.45
test.tsFile · 0.45
tzComponentsMethod · 0.45
tests.tsFile · 0.45

Calls 1

tzOffsetFunction · 0.90

Tested by

no test coverage detected