Saltearse al contenido

cli/utils/dateAdd

Esta página aún no está disponible en tu idioma.

type Interval =
| "year"
| "quarter"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second";

Defined in: studiocms/packages/studiocms/src/cli/utils/dateAdd.ts:3^

function dateAdd(
date: Date,
interval: Interval,
units: number): any

Defined in: studiocms/packages/studiocms/src/cli/utils/dateAdd.ts:14^

Adds time to a date. Modelled after MySQL DATE_ADD function. Example: dateAdd(new Date(), ‘minute’, 30) //returns 30 minutes from now. https://stackoverflow.com/a/1214753/18511^

Date

Date to start with

Interval

One of: year, quarter, month, week, day, hour, minute, second

number

Number of units of the given interval to add.

any