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

# Date ranges

> Filter list calls with inclusive, exclusive, and open-ended date bounds

Many list operations accept a date range so you can filter by day. Guile uses
`YYYY-MM-DD` dates (RFC 3339 calendar dates) and interval notation for bounds.

## What you do first

1. Format each day as `YYYY-MM-DD` (for example `2024-12-01`).
2. Pick the bound style that matches the filter you mean.
3. Send that string on the range field the operation documents.

| Shape                         | Meaning                 | Example                                          |
| ----------------------------- | ----------------------- | ------------------------------------------------ |
| One day                       | That calendar day only  | `2024-12-01` (same as `[2024-12-01,2024-12-01]`) |
| `[start,end]`                 | Both ends included      | `[2024-12-01,2024-12-31]`                        |
| `(start,end)`                 | Both ends excluded      | `(2024-12-01,2024-12-31)`                        |
| `[start,end)` / `(start,end]` | One end in, one end out | `[2024-12-01,2024-12-31)`                        |
| `[start,]` / `(,end]`         | Open on one side        | `[2024-12-01,]`                                  |

The range string must stay within 24 characters. Invalid calendar days or bad
brackets fail validation.

### Example list call

```bash theme={null}
curl 'https://api.guile.app/barbers/barber_01/appointments?date=[2024-12-01,2024-12-31]&limit=20' \
 -H "Authorization: Bearer $GUILE_TOKEN"
```

## When a call fails

A bad range returns a problem such as
[https://docs.guile.app/problems/invalidDateRange](/problems/invalidDateRange).
Open the `type` link for the fix.

## Related paths

* [Appointments](/api-reference/Appointments/overview): list filters often take a date range
* [Problem types](/api-reference/problems): how failures are shaped
