# `Filtrex.Condition.Date`
[🔗](https://github.com/rcdilorenzo/filtrex/blob/main/lib/filtrex/conditions/date.ex#L1)

`Filtrex.Condition.Date` is a specific condition type for handling date filters with various comparisons.

Configuration Options:

| Key    | Type    | Description                                                    |
|--------|---------|----------------------------------------------------------------|
| format | string  | the date format* to use for parsing the incoming date string |
|        |         | (defaults to YYYY-MM-DD)                                       |

\* See https://hexdocs.pm/timex/Timex.Format.DateTime.Formatters.Default.html

There are three different value formats allowed based on the type of comparator:

| Key        | Type    | Format / Allowed Values                   |
|------------|---------|-------------------------------------------|
| inverse    | boolean | See `Filtrex.Condition.Text`              |
| column     | string  | any allowed keys from passed `config`     |
| comparator | string  | after, on or after, before, on or before,|
|            |         | equals, does not equal                    |
| value      | string  | "YYYY-MM-DD"                              |
| type       | string  | "date"                                    |

| Key        | Type    | Format / Allowed Values                   |
|------------|---------|-------------------------------------------|
| inverse    | boolean | See `Filtrex.Condition.Text`              |
| column     | string  | any allowed keys from passed `config`     |
| comparator | string  | between, not between                      |
| value      | map     | %{start: "YYYY-MM-DD", end: "YYYY-MM-DD"} |
| type       | string  | "date"                                    |

# `t`

```elixir
@type t() :: t()
```

# `comparators`

# `parse`

# `type`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
