MCPcopy Create free account
hub / github.com/Effect-TS/effect / toWeeks

Function toWeeks

packages/effect/src/Duration.ts:1011–1017  ·  view source on GitHub ↗
(self: Input)

Source from the content-addressed store, hash-verified

1009 * @since 3.8.0
1010 */
1011export const toWeeks = (self: Input): number =>
1012 match(fromInputUnsafe(self), {
1013 onMillis: (millis) => millis / 604_800_000,
1014 onNanos: (nanos) => nanosToUnit(nanos, 604_800_000_000_000),
1015 onInfinity: () => Infinity,
1016 onNegativeInfinity: () => -Infinity
1017 })
1018
1019/**
1020 * Gets the duration in nanoseconds as a bigint.

Callers

nothing calls this directly

Calls 3

nanosToUnitFunction · 0.85
matchFunction · 0.70
fromInputUnsafeFunction · 0.70

Tested by

no test coverage detected