Filtrex v0.4.3 Filtrex.Condition.Date
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” |