openmrs-esm-core

O3 Framework / DurationOptionsWithFormat

Interface: DurationOptionsWithFormat

Defined in: packages/framework/esm-utils/src/dates/date-util.ts:508

Extends

Properties

formatOptions?

optional formatOptions: Partial<ResolvedDurationFormatOptions>

Defined in: packages/framework/esm-utils/src/dates/date-util.ts:510

Options passed to Intl.DurationFormat. Defaults to { style: ‘short’, localeMatcher: ‘lookup’ }.


largestUnit?

optional largestUnit: "auto" | DurationUnit

Defined in: packages/framework/esm-utils/src/dates/date-util.ts:503

Coarsest unit to include. Accepts ‘auto’ (default when smallestUnit is set), which resolves to the largest non-zero unit or smallestUnit, whichever is greater. Mirrors Temporal.Duration.round() behavior.

Inherited from

DurationOptions.largestUnit


smallestUnit?

optional smallestUnit: DurationUnit

Defined in: packages/framework/esm-utils/src/dates/date-util.ts:505

Finest unit to include. Defaults to largestUnit when largestUnit is an explicit unit, giving a single-unit result.

Inherited from

DurationOptions.smallestUnit


thresholds?

optional thresholds: Partial<Record<DurationUnit, number>>

Defined in: packages/framework/esm-utils/src/dates/date-util.ts:497

Override auto-selection thresholds. Each value is in the unit’s own terms (e.g., seconds: 30 means “use seconds if < 30 seconds”).

Inherited from

DurationOptions.thresholds