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

Function toDays

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

Source from the content-addressed store, hash-verified

985 * @since 3.8.0
986 */
987export const toDays = (self: Input): number =>
988 match(fromInputUnsafe(self), {
989 onMillis: (millis) => millis / 86_400_000,
990 onNanos: (nanos) => nanosToUnit(nanos, 86_400_000_000_000),
991 onInfinity: () => Infinity,
992 onNegativeInfinity: () => -Infinity
993 })
994
995/**
996 * Converts a Duration to weeks.

Callers

nothing calls this directly

Calls 3

nanosToUnitFunction · 0.85
matchFunction · 0.70
fromInputUnsafeFunction · 0.70

Tested by

no test coverage detected