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

getDay

import { getDay } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Which day of the week is 29 February 2012?
const result = getDay(new Date(2012, 1, 29))
//=> 3
function getDay<DateType extends Date>(date: DateType | number | string): number;
§
getDay<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 day of week, 0 represents Sunday