getISOWeek.d.ts 773 B

1234567891011121314151617181920212223242526272829
  1. import type { ContextOptions, DateArg } from "./types.js";
  2. /**
  3. * The {@link getISOWeek} function options.
  4. */
  5. export interface GetISOWeekOptions extends ContextOptions<Date> {}
  6. /**
  7. * @name getISOWeek
  8. * @category ISO Week Helpers
  9. * @summary Get the ISO week of the given date.
  10. *
  11. * @description
  12. * Get the ISO week of the given date.
  13. *
  14. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  15. *
  16. * @param date - The given date
  17. * @param options - The options
  18. *
  19. * @returns The ISO week
  20. *
  21. * @example
  22. * // Which week of the ISO-week numbering year is 2 January 2005?
  23. * const result = getISOWeek(new Date(2005, 0, 2))
  24. * //=> 53
  25. */
  26. export declare function getISOWeek(
  27. date: DateArg<Date> & {},
  28. options?: GetISOWeekOptions | undefined,
  29. ): number;