differenceInCalendarISOWeekYears.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @name differenceInCalendarISOWeekYears
  3. * @category ISO Week-Numbering Year Helpers
  4. * @summary Get the number of calendar ISO week-numbering years between the given dates.
  5. *
  6. * @description
  7. * Get the number of calendar ISO week-numbering years between the given dates.
  8. *
  9. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  10. *
  11. * @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).
  12. *
  13. * @param dateLeft - The later date
  14. * @param dateRight - The earlier date
  15. *
  16. * @returns The number of calendar ISO week-numbering years
  17. *
  18. * @example
  19. * // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?
  20. * const result = differenceInCalendarISOWeekYears(
  21. * new Date(2012, 0, 1),
  22. * new Date(2010, 0, 1)
  23. * )
  24. * //=> 2
  25. */
  26. export declare function differenceInCalendarISOWeekYears<DateType extends Date>(
  27. dateLeft: DateType | number | string,
  28. dateRight: DateType | number | string,
  29. ): number;