DurationNaturalLanguageX extension

Alternative duration formatting for human-readable UI copy.

Complements HumanizedDuration with two additional formats:

on

Methods

toCompactString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Short compact form showing the two most significant non-zero units.
toDetailedString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Abbreviated breakdown including milliseconds.
toNaturalString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Natural-language description using the two largest non-zero units.