Skip to main content
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/milliseconds/index.ts";

Examples

// 1 year in milliseconds milliseconds({ years: 1 }) //=> 31556952000

// 3 months in milliseconds milliseconds({ months: 3 }) //=> 7889238000

Parameters

unnamed 0: Duration
  • the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using Math.floor, decimals less than zero will be rounded using Math.ceil.

Returns

number

the milliseconds