Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/durationjs/src/duration.ts>Duration#toTimeString

Get the formated time duration
Latest
method Duration.prototype.toTimeString
import { Duration } from "https://deno.land/x/durationjs@v4.1.1/src/duration.ts";

Get a duration formatted using colons (:).

Parameters

optional
fromT: keyof DurationObj = [UNSUPPORTED]

Unit to display from.

optional
toT: keyof DurationObj = [UNSUPPORTED]

Unit to display upto.

Returns

string

Formatted string.