Date range parser in Python.
This is a minimalistic (and slightly hacky) parser for date range conditionals.
- comma-separated clauses (AND)
- clause: attribute comparison_operator value (spaces optional)
- attribute: year, month, day, hour, month, second, weekday, isoweekday or empty for full datetime
- comparison_operator: == != <= >= < >
- value: integer, 'now' or dateutil-compatible date input
For example, you can state year == 2016, month > 06, day >= 07 which matches dates between July and December 2016, but ignoring days 1-6 of each month.