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

Function toWeeks

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

Source from the content-addressed store, hash-verified

901 * @since 3.8.0
902 */
903export const toWeeks = (self: Input): number =>
904 match(fromInputUnsafe(self), {
905 onMillis: (millis) => millis / 604_800_000,
906 onNanos: (nanos) => Number(nanos) / 604_800_000_000_000,
907 onInfinity: () => Infinity,
908 onNegativeInfinity: () => -Infinity
909 })
910
911/**
912 * Gets the duration in nanoseconds as a bigint.

Callers

nothing calls this directly

Calls 3

fromInputUnsafeFunction · 0.85
matchFunction · 0.70
NumberInterface · 0.70

Tested by

no test coverage detected