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

lastDayOfDecade

import { lastDayOfDecade } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// The last day of a decade for 21 December 2012 21:12:00:
const result = lastDayOfDecade(new Date(2012, 11, 21, 21, 12, 00))
//=> Wed Dec 31 2019 00:00:00
function lastDayOfDecade<DateType extends Date>(date: DateType | number | string): DateType;
§
lastDayOfDecade<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 last day of a decade