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

Defined in

DurationFormatter.ts:23

Properties

units

units: DurationFormatAssetsTime = DEFAULT_UNITS

Defined in

DurationFormatter.ts:23

Methods

format()

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

Parameters

ParameterTypeDefault value
durationnumberundefined
precisionnumber7
__namedParametersDurationFormatSeparatorsDEFAULT_SEPARATORS

Returns

string

Defined in

DurationFormatter.ts:25