Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

getDaysInYear

import { getDaysInYear } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// How many days are in 2012?
const result = getDaysInYear(new Date(2012, 0, 1))
//=> 366
function getDaysInYear<DateType extends Date>(date: DateType | number | string): number;
§
getDaysInYear<DateType extends Date>(date: DateType | number | string): number
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The given date

§Return Type

§
number
[src]

The number of days in a year