Reduced duplicate code in DateRange