DurationObjectAn object with optional duration components that can be combined to create a Duration. All fields are optional and additive.
Details
Compatible with Temporal.Duration-like objects.
Example (Combining duration object fields)
import { Duration } from "effect"
Duration.fromInputUnsafe({ seconds: 30 })
Duration.fromInputUnsafe({ days: 1 })
Duration.fromInputUnsafe({ seconds: 1, nanoseconds: 500 })models
Source effect/Duration.ts:18910 lines
export interface DurationObject {
readonly DurationObject.weeks?: number | undefinedweeks?: number | undefined
readonly DurationObject.days?: number | undefineddays?: number | undefined
readonly DurationObject.hours?: number | undefinedhours?: number | undefined
readonly DurationObject.minutes?: number | undefinedminutes?: number | undefined
readonly DurationObject.seconds?: number | undefinedseconds?: number | undefined
readonly DurationObject.milliseconds?: number | undefinedmilliseconds?: number | undefined
readonly DurationObject.microseconds?: number | undefinedmicroseconds?: number | undefined
readonly DurationObject.nanoseconds?: number | undefinednanoseconds?: number | undefined
}Referenced by 2 symbols