DurationNaturalLanguageX extension

Alternative duration formatting focused on human-readable text for UI copy.

This library is intentionally not exported from package:gmana/gmana.dart because gmana already provides another Duration extension with some overlapping method names.

on

Properties

isNegative bool

Available on Duration, provided by the DurationNaturalLanguageX extension

Whether this duration is negative.
no setter
isZero bool

Available on Duration, provided by the DurationNaturalLanguageX extension

Whether this duration is exactly zero.
no setter

Methods

isLongerThan(Duration other) bool

Available on Duration, provided by the DurationNaturalLanguageX extension

Returns true when this duration exceeds other.
isShorterThan(Duration other) bool

Available on Duration, provided by the DurationNaturalLanguageX extension

Returns true when this duration is shorter than other.
toClockString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Returns a stopwatch-style string.
toCompactString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Returns a short compact form for tight UI.
toHumanizedString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Returns a natural-language description using the two largest non-zero units.
toRelativeString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Returns a relative time string suitable for UI copy.
toVerboseString() String

Available on Duration, provided by the DurationNaturalLanguageX extension

Full breakdown including milliseconds.