endOfISOWeek.d.mts 859 B

12345678910111213141516171819202122232425
  1. /**
  2. * @name endOfISOWeek
  3. * @category ISO Week Helpers
  4. * @summary Return the end of an ISO week for the given date.
  5. *
  6. * @description
  7. * Return the end of an ISO week for the given date.
  8. * The result will be in the local timezone.
  9. *
  10. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  11. *
  12. * @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).
  13. *
  14. * @param date - The original date
  15. *
  16. * @returns The end of an ISO week
  17. *
  18. * @example
  19. * // The end of an ISO week for 2 September 2014 11:55:00:
  20. * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
  21. * //=> Sun Sep 07 2014 23:59:59.999
  22. */
  23. export declare function endOfISOWeek<DateType extends Date>(
  24. date: DateType | number | string,
  25. ): DateType;