tc.js

@jacobhumston/tc.js


@jacobhumston/tc.js / convertTo

Function: convertTo()

convertTo(time, unit): number

Defined in: convert.ts:51

Converts the provided time values to the specified unit.

Parameters

time

AvailableConversions

The time to convert.

unit

The unit to convert the time to.

"microseconds" "milliseconds" "seconds" "minutes" "hours" "days" "weeks" "months" "years" "decades" "centuries"

Returns

number

The converted time value.