Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function dayOfYear
import { dayOfYear } from "https://deno.land/std@0.209.0/datetime/day_of_year.ts";

Returns the number of the day in the year in the local time zone.

Examples

Example 1

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

dayOfYear(new Date("2019-03-11T03:24:00")); // output: 70

Returns

number

Number of the day in the year in the local time zone