Skip to main content
Module

x/durationjs/mod.ts>Duration.between

Get the formated time duration
Go to Latest
method Duration.between
import { Duration } from "https://deno.land/x/durationjs@v4.0.1/mod.ts";

Get the duration between two timestamps or two other durations.

Parameters

duration1: string | number | Duration

Duration/Timestamp to find duration from.

duration2:
| string
| number
| undefined
| null

Duration/Timestamp to find duration upto.

Returns

New duration between the two specified durations.