getISOWeeksInYear.d.cts 928 B

1234567891011121314151617181920212223242526272829
  1. import type { ContextOptions, DateArg } from "./types.js";
  2. /**
  3. * The {@link getISOWeeksInYear} function options.
  4. */
  5. export interface GetISOWeeksInYearOptions extends ContextOptions<Date> {}
  6. /**
  7. * @name getISOWeeksInYear
  8. * @category ISO Week-Numbering Year Helpers
  9. * @summary Get the number of weeks in an ISO week-numbering year of the given date.
  10. *
  11. * @description
  12. * Get the number of weeks in an ISO week-numbering year 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 - An object with options
  18. *
  19. * @returns The number of ISO weeks in a year
  20. *
  21. * @example
  22. * // How many weeks are in ISO week-numbering year 2015?
  23. * const result = getISOWeeksInYear(new Date(2015, 1, 11))
  24. * //=> 53
  25. */
  26. export declare function getISOWeeksInYear(
  27. date: DateArg<Date> & {},
  28. options?: GetISOWeeksInYearOptions | undefined,
  29. ): number;