Skip to main content
Module

std/datetime/day_of_year.ts>dayOfYear

The Deno Standard Library
Latest
function dayOfYear
import { dayOfYear } from "https://deno.land/std@0.223.0/datetime/day_of_year.ts";

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

Examples

Basic usage

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

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

Parameters

date: Date

Date to get the day of the year of.

Returns

number

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