# DateRange class · @imqueue/pg-sequelize

Source: https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.daterange/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-sequelize 4.2.0 — generated reference, not hand-written

A range between two dates, as an `@imqueue/rpc` type.

**Signature:**

```typescript
export declare class DateRange implements IRange 
```
**Implements:** [IRange](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.irange/)

## Remarks

Accepts a `Date` or an ISO-8601 string on either bound, because a remote caller has only the string — a `Date` does not survive JSON.

Used through the `Range`-suffix convention rather than by naming the column directly: filter `<column>Range` and `query.withRangeFilters` moves it onto `<column>`. Passing both forms for one column throws a `TypeError` rather than silently preferring one.

## Example


```typescript
// reservations whose `duration` column falls inside the window
const filter = {
    durationRange: { start: '2026-08-01', end: '2026-08-31' },
} as FilterInput;
```

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [end](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.daterange.end/) |  | string \| Date | End of the range — a `Date`, or an ISO-8601 string from a remote caller. |
| [start](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.daterange.start/) |  | string \| Date | Start of the range — a `Date`, or an ISO-8601 string from a remote caller. |

