Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/lib/stdx/mod.ts>datetime.weekOfYear

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function datetime.weekOfYear
import { datetime } from "https://deno.land/x/hex@0.6.5/src/lib/stdx/mod.ts";
const { weekOfYear } = datetime;

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

Examples

Example 1

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

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

Returns

number

Number of the week in year