Days available

This branch is ready for review, testing and possible acceptance. To ensure a smooth pull request the current state of master has already been merged into the branch which ensures that things like TEMPLATE_DIRS get handled correctly.