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

Function toHours

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

Source from the content-addressed store, hash-verified

855 * @since 3.8.0
856 */
857export const toHours = (self: Input): number =>
858 match(fromInputUnsafe(self), {
859 onMillis: (millis) => millis / 3_600_000,
860 onNanos: (nanos) => Number(nanos) / 3_600_000_000_000,
861 onInfinity: () => Infinity,
862 onNegativeInfinity: () => -Infinity
863 })
864
865/**
866 * Converts a Duration to days.

Callers

nothing calls this directly

Calls 3

fromInputUnsafeFunction · 0.85
matchFunction · 0.70
NumberInterface · 0.70

Tested by

no test coverage detected