Skip to main content
Go to Latest
interface PrettyDurationOptions
import { type PrettyDurationOptions } from "https://deno.land/std@0.165.0/fmt/duration.ts";

Properties

formatType: "short" | "time" | "full"

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

ignoreZero: boolean

Whether to ignore zero values. With formatType="short" | "full", all zero values are ignored. With formatType="time", only values in the ends are ignored.