differenceInCalendarQuarters.d.mts 919 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @name differenceInCalendarQuarters
  3. * @category Quarter Helpers
  4. * @summary Get the number of calendar quarters between the given dates.
  5. *
  6. * @description
  7. * Get the number of calendar quarters between the given dates.
  8. *
  9. * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
  10. *
  11. * @param dateLeft - The later date
  12. * @param dateRight - The earlier date
  13. * @returns The number of calendar quarters
  14. *
  15. * @example
  16. * // How many calendar quarters are between 31 December 2013 and 2 July 2014?
  17. * const result = differenceInCalendarQuarters(
  18. * new Date(2014, 6, 2),
  19. * new Date(2013, 11, 31)
  20. * )
  21. * //=> 3
  22. */
  23. export declare function differenceInCalendarQuarters<DateType extends Date>(
  24. dateLeft: DateType | number | string,
  25. dateRight: DateType | number | string,
  26. ): number;