tc.js

@jacobhumston/tc.js


@jacobhumston/tc.js / roundConvert

Function: roundConvert()

roundConvert(time, precision): Record<"microseconds" | "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "decades" | "centuries", number>

Defined in: convert.ts:34

Rounds the converted time values to the specified precision.

Parameters

time

AvailableConversions

The time to convert and round.

precision

number = 2

The precision to round the values to.

Returns

Record<"microseconds" | "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "decades" | "centuries", number>

The rounded converted time values.