import { default } from "https://deno.land/x/durationjs@v4.1.1/src/duration.ts";
A simple JavaScript class used to parse time durations
Properties
An array of time units and their values.
Data in the class mapped as a JavaScript Object.
Methods
Add more microseconds to the duration.
Add more milliseconds to the duration.
Add more minutes to the duration.
Add more nanoseconds to the duration.
Add more seconds to the duration.
Get duration as days.
Get duration as hours.
Get duration as microseconds.
Get duration as milliseconds.
Get duration as minutes.
Get duration as nanoseconds.
Get duration as seconds.
Clone current duration (run Duration#reload before this if you manually tweaked the properties).
Get a simple formatted duration in the form dd:hh:mm:ss:ms (Deprecated. Use Duration#toString())
Set microseconds of the duration.
Set milliseconds of the duration.
Set minutes of the duration.
Set nanoseconds of the duration.
Set seconds of the duration.
Get a formatted, human-readable string of the duration.
Convert the Duration into a plain object.
Get a formatted, human-readable string of the duration.
Get a simple formatted duration in the form dd:hh:mm:ss:ms
Get a duration formatted using colons (:).
Get a human-readable string of the duration in words.
Just the valueOf method.
Static Methods
Get the duration between two timestamps or two other durations.
Reads a given string and parses a duration from it.
Get the duration till next midnight in milliseconds.
Read duration data from a string.