Add a window method to TimeRange

This is now built on top of #791