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

getDaysInMonth

import { getDaysInMonth } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// How many days are in February 2000?
const result = getDaysInMonth(new Date(2000, 1))
//=> 29
function getDaysInMonth<DateType extends Date>(date: DateType | number | string): number;
§
getDaysInMonth<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 month