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

startOfDecade

import { startOfDecade } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// The start of a decade for 21 October 2015 00:00:00:
const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00))
//=> Jan 01 2010 00:00:00
function startOfDecade<DateType extends Date>(date: DateType | number | string): DateType;
§
startOfDecade<DateType extends Date>(date: DateType | number | string): DateType
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

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

§Return Type

§
DateType
[src]

The start of a decade