getISODay.d.ts 790 B

12345678910111213141516171819202122232425
  1. /**
  2. * @name getISODay
  3. * @category Weekday Helpers
  4. * @summary Get the day of the ISO week of the given date.
  5. *
  6. * @description
  7. * Get the day of the ISO week of the given date,
  8. * which is 7 for Sunday, 1 for Monday etc.
  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 given date
  15. *
  16. * @returns The day of ISO week
  17. *
  18. * @example
  19. * // Which day of the ISO week is 26 February 2012?
  20. * const result = getISODay(new Date(2012, 1, 26))
  21. * //=> 7
  22. */
  23. export declare function getISODay<DateType extends Date>(
  24. date: DateType | number | string,
  25. ): number;