Skip to main content

Class: DurationFormatter

Defined in: DurationFormatter.ts:22

Display the duration

Param

The duration in milliseconds to parse and display

Param

The language assets

Constructors

new DurationFormatter()

new DurationFormatter(units: DurationFormatAssetsTime): DurationFormatter

Defined in: DurationFormatter.ts:23

Parameters

ParameterTypeDefault value
unitsDurationFormatAssetsTimeDEFAULT_UNITS

Returns

DurationFormatter

Properties

units

units: DurationFormatAssetsTime = DEFAULT_UNITS

Defined in: DurationFormatter.ts:23

Methods

format()

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

Defined in: DurationFormatter.ts:25

Parameters

ParameterTypeDefault value
durationnumberundefined
precisionnumber7
__namedParametersDurationFormatSeparatorsDEFAULT_SEPARATORS

Returns

string