> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bringits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Date Range Generation

> Generate a date range or a list of date ranges

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

| Parameter                   | Type                     | Description                                                                          | Required |
| --------------------------- | ------------------------ | ------------------------------------------------------------------------------------ | -------- |
| **format**                  | string                   | Date format string (e.g. `"yyyy-MM-dd"`) or `"unix"` for Unix timestamp              | Yes      |
| **key**                     | string                   | Where to store results. Possible values: `"data"`, `"children"`, `"local_variables"` | Yes      |
| **range**                   | DateRangeConfiguration   | Defines the date range around the base date using relative offsets                   | Yes      |
| **utcOffset**               | string                   | UTC offset (e.g. `"+03:00"`)                                                         | Yes      |
| **dateOffset**              | DateOffsetConfiguration  | Shift the base date by a fixed amount                                                | No       |
| **listConfig**              | DateListGenerationConfig | Generate a list of date ranges                                                       | No       |
| **output\_parameter\_name** | string                   | Output parameter name for local variables                                            | No       |

### DateRangeConfiguration

| Field    | Type   | Description                                                                   | Required |
| -------- | ------ | ----------------------------------------------------------------------------- | -------- |
| **from** | number | Amount to subtract/add from the base date for the start                       | Yes      |
| **to**   | number | Amount to subtract/add from the base date for the end                         | Yes      |
| **unit** | string | Time unit: `"minutes"`, `"hours"`, `"days"`, `"weeks"`, `"months"`, `"years"` | Yes      |

### DateOffsetConfiguration

| Field     | Type   | Description                                                                   | Required |
| --------- | ------ | ----------------------------------------------------------------------------- | -------- |
| **unit**  | string | Time unit: `"minutes"`, `"hours"`, `"days"`, `"weeks"`, `"months"`, `"years"` | Yes      |
| **value** | number | Amount to shift (positive or negative)                                        | Yes      |

## Usage Examples

### Generate This Week's Date Range

```json theme={null}
{
  "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

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

## Related Commands

* [Date Generation](/stream/commands/generate/date-generation) - Generate single dates
* [Numeric Sequence Generation](/stream/commands/generate/numeric-sequence-generation) - Generate number sequences
