Very Popular
Latest
function default
import { default } from "https://dotland.deno.dev/x/date_fns@v2.22.1/differenceInMonths/index.ts";

Examples

// How many full months are between 31 January 2014 and 1 September 2014? var result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31)) //=> 7

Parameters

dirtyDateLeft: Date | number
  • the later date
dirtyDateRight: Date | number
  • the earlier date

Returns

number

the number of full months