Creates a new instance of the DateRange class with the specified start and end dates.
DateRange(date startDate, [date? endDate]) { _dates = [startDate, endDate ?? startDate]; }