import { date } from "https://deno.land/x/postgres@v0.17.1/deps.ts";
const { difference } = date;
Calculate difference between two dates.
Parameters
from: Date
Year to calculate difference
to: Date
Year to calculate difference with
optional
options: DifferenceOptionsOptions for determining how to respond
example :
import * as datetime from "https://deno.land/std@0.224.0/datetime/mod.ts";
datetime.difference(new Date("2020/1/1"),new Date("2020/2/2"),{ units : ["days","months"] })