Skip to main content
Go to Latest
function weekOfYear
import { weekOfYear } from "https://deno.land/std@0.202.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.202.0/datetime/week_of_year.ts";

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

Parameters

date: Date

Returns

number

Number of the week in year