FormatOptions

import { FormatOptions } from "jsr:@ende/fmt/duration";

interface

interface FormatOptions

Options for format.

Properties

style

style?: "narrow" | "digital" | "full"

The style for formatting the duration.

"narrow" for "0d 0h 0m 0s 0ms..." "digital" for "00:00:00:00:000..." "full" for "0 days, 0 hours, 0 minutes,..."

Default: "narrow"

ignoreZero

ignoreZero?: boolean

Whether to ignore zero values. With style="narrow" | "full", all zero values are ignored. With style="digital", only values in the ends are ignored.

Default: false

Source