differenceInQuarters
import { differenceInQuarters } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// How many full quarters are between 31 December 2013 and 2 July 2014?
const result = differenceInQuarters(new Date(2014, 6, 2), new Date(2013, 11, 31))
//=> 2
function differenceInQuarters<DateType extends Date>(
dateLeft: DateType | number | string,
dateRight: DateType | number | string,
options?: DifferenceInQuartersOptions,
): number;§
differenceInQuarters<DateType extends Date>(dateLeft: DateType | number | string, dateRight: DateType | number | string, options?: DifferenceInQuartersOptions): number
[src]§Parameters
§
options?: DifferenceInQuartersOptions optional
[src]- An object with options.