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

x/durationjs/src/duration.ts>Duration.fromString

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

Reads a given string and parses a duration from it.

Parameters

str: string

A string which could contain a duration

optional
doNotParse = [UNSUPPORTED]

Directly return the values read