cli/utils/dateAdd
Esta página aún no está disponible en tu idioma.
Type Aliases
Section titled “Type Aliases”Interval
Section titled “Interval”type Interval = | "year" | "quarter" | "month" | "week" | "day" | "hour" | "minute" | "second";
Defined in: studiocms/packages/studiocms/src/cli/utils/dateAdd.ts:3^
Functions
Section titled “Functions”dateAdd()
Section titled “dateAdd()”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^
Parameters
Section titled “Parameters”Date
Date to start with
interval
Section titled “interval”One of: year, quarter, month, week, day, hour, minute, second
number
Number of units of the given interval to add.
Returns
Section titled “Returns”any