Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/complaindate/mod.ts>differenceInYears

JavaScript date-time utilities that keeps timezones on the surface
Go to Latest
function differenceInYears
import { differenceInYears } from "https://deno.land/x/complaindate@v0.7.2/mod.ts";

Get a function curried with a date, from which to get the number of crossings over years between it and other dates.

Parameters

from: { year: number | string; }

A date to calculate the difference from

Returns

(to: { year: number | string; }) => number

A curried function that operates on dates