datetimeformat function, to be used as a filter with jinja2
make use of jinja2 templating for periods
use dot notation for period values