Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.5.1/differenceInCalendarMonths/index.js";

Examples

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

Parameters

dirtyDateLeft
  • the later date
dirtyDateRight
  • the earlier date