Skip to main content
Very Popular
Go to Latest
function differenceInMonths
import { differenceInMonths } from "https://deno.land/x/date_fns@v2.15.0/index.js";

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
  • the later date
dirtyDateRight
  • the earlier date