Adds date range processing

This merge resolves a conflict from Alex's PR, and brings the codebases into sync.