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

subMinutes

import { subMinutes } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Subtract 30 minutes from 10 July 2014 12:00:00:
const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
//=> Thu Jul 10 2014 11:30:00
function subMinutes<DateType extends Date>(date: DateType | number | string, amount: number): DateType;
§
subMinutes<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 minutes to be subtracted.

§Return Type

§
DateType
[src]

The new date with the minutes subtracted