add callback to detect date ranges

Signed-off-by: Suhayb El Wardany <me@suw.me>