Skip to main content

Class: DurationFormatter

Display the duration

Param

The duration in milliseconds to parse and display

Param

The language assets

Constructors

new DurationFormatter()

new DurationFormatter(units: DurationFormatAssetsTime): DurationFormatter

Parameters

ParameterTypeDefault value
unitsDurationFormatAssetsTimeDEFAULT_UNITS

Returns

DurationFormatter

Source

lib/DurationFormatter.ts:23

Properties

units

units: DurationFormatAssetsTime = DEFAULT_UNITS

Source

lib/DurationFormatter.ts:23

Methods

format()

format(duration: number, precision: number, __namedParameters: DurationFormatSeparators): string

Parameters

ParameterTypeDefault value
durationnumberundefined
precisionnumber7
__namedParametersDurationFormatSeparatorsDEFAULT_SEPARATORS

Returns

string

Source

lib/DurationFormatter.ts:25