DRYing aggregate time range calculation.