@lonu/stc
Version:
A tool for converting OpenApi/Swagger/Apifox into code.
18 lines • 554 B
TypeScript
/**
* Returns the ISO week number of the provided date (1-53).
*
* @param date Date to get the week number of.
* @returns The week number of the provided date.
*
* @example Basic usage
* ```ts
* import { weekOfYear } from "@std/datetime/week-of-year";
* import { assertEquals } from "@std/assert";
*
* assertEquals(weekOfYear(new Date("2020-12-28T03:24:00")), 53);
*
* assertEquals(weekOfYear(new Date("2020-07-10T03:24:00")), 28);
* ```
*/
export declare function weekOfYear(date: Date): number;
//# sourceMappingURL=week_of_year.d.ts.map