Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function weekOfYear
import { weekOfYear } from "https://deno.land/std@0.211.0/datetime/week_of_year.ts";

Returns the ISO week number of the provided date (1-53).

Examples

Example 1

import { weekOfYear } from "https://deno.land/std@0.211.0/datetime/week_of_year.ts";

weekOfYear(new Date("2020-12-28T03:24:00")); // Returns 53

Returns

number

Number of the week in year