Add units to Date
2 min
Adds number of units to a given date. There are multiple functions under this definition defined in the table below.
Give a negative value in "by" to execute a subtraction.
Function Path | Description |
|---|---|
/adddminutes | Adds minutes to the given date |
/adddays | Adds days to the given date |
/addmonths | Adds months to the given date |
/addyears | Adds years to the given date |
API Definition
Add API
Call the following API:
POST
https://orca.pathfix.com/functions/json/addminutes
json
{
"input": "2020-01-20T10:30",
"ny": "-330"
}200
"output": {
"year": 2020,
"month": 1,
"day": 20,
"dayOfWeek": 1,
"dayOfYear": 20,
"hour": 5,
"hour12": 5,
"minute": 0,
"ISO": "2020-01-20T05:00:00Z",
"dateISO": "2020-01-20",
"posixSeconds": 1579496400,
"posixMilliSeconds": 1579496400000,
"ampn": "am",
"monthName": "Jan"
}404
{
"message": "error"
}