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

subQuarters

import { subQuarters } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Subtract 3 quarters from 1 September 2014:
const result = subQuarters(new Date(2014, 8, 1), 3)
//=> Sun Dec 01 2013 00:00:00
function subQuarters<DateType extends Date>(date: DateType | number | string, amount: number): DateType;
§
subQuarters<DateType extends Date>(date: DateType | number | string, amount: number): DateType
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The date to be changed
§
amount: number
[src]
  • The amount of quarters to be subtracted.

§Return Type

§
DateType
[src]

The new date with the quarters subtracted