Filtrex v0.3.0 Filtrex.Condition.Date

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

Configuration Options:

KeyTypeDescription
formatstringthe 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:

KeyTypeFormat / Allowed Values
inversebooleanSee Filtrex.Condition.Text
columnstringany allowed keys from passed config
comparatorstringafter, on or after, before, on or before,
equals, does not equal
valuestring“YYYY-MM-DD”
typestring“date”
KeyTypeFormat / Allowed Values
inversebooleanSee Filtrex.Condition.Text
columnstringany allowed keys from passed config
comparatorstringbetween, not between
valuemap%{start: “YYYY-MM-DD”, end: “YYYY-MM-DD”}
typestring“date”

Summary

Functions

Callback implementation for Filtrex.Condition.comparators/0

Callback implementation for Filtrex.Condition.parse/2

Callback implementation for Filtrex.Condition.type/0

Types

Functions

comparators()

Callback implementation for Filtrex.Condition.comparators/0.

parse(config, map)

Callback implementation for Filtrex.Condition.parse/2.

type()

Callback implementation for Filtrex.Condition.type/0.