Skip to main content
The Date Range Generation command (Command Type: 1301) generates a date range or a list of date ranges around a base date.

Command Type

Command Type ID: 1301

Parameters

ParameterTypeDescriptionRequired
formatstringDate format string (e.g. "yyyy-MM-dd") or "unix" for Unix timestampYes
keystringWhere to store results. Possible values: "data", "children", "local_variables"Yes
rangeDateRangeConfigurationDefines the date range around the base date using relative offsetsYes
utcOffsetstringUTC offset (e.g. "+03:00")Yes
dateOffsetDateOffsetConfigurationShift the base date by a fixed amountNo
listConfigDateListGenerationConfigGenerate a list of date rangesNo
output_parameter_namestringOutput parameter name for local variablesNo

DateRangeConfiguration

FieldTypeDescriptionRequired
fromnumberAmount to subtract/add from the base date for the startYes
tonumberAmount to subtract/add from the base date for the endYes
unitstringTime unit: "minutes", "hours", "days", "weeks", "months", "years"Yes

DateOffsetConfiguration

FieldTypeDescriptionRequired
unitstringTime unit: "minutes", "hours", "days", "weeks", "months", "years"Yes
valuenumberAmount to shift (positive or negative)Yes

Usage Examples

Generate This Week’s Date Range

{
  "command": "date-range-generation",
  "params": {
    "format": "yyyy-MM-dd",
    "key": "data",
    "utcOffset": "+00:00",
    "range": { "from": 0, "to": 6, "unit": "days" }
  }
}

Generate Last Month to Next Month

{
  "command": "date-range-generation",
  "params": {
    "format": "yyyy-MM-dd",
    "key": "data",
    "utcOffset": "+03:00",
    "range": { "from": -1, "to": 1, "unit": "months" }
  }
}