nikola.packages.datecond package¶
Module contents¶
Date range parser.
-
nikola.packages.datecond.
date_in_range
(date_range, date, debug=False, now=None)¶ Check if date is in the range specified.
Format: * 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
The optional now parameter can be used to provide a specific now value (if none is provided, datetime.datetime.now() is used).