public static DayRange[] DaysToDayRanges(DateTime[] days) { DayRange[] ranges = new DayRange[days.Length]; for (int x = 0; x < days.Length; x++) { DayRange dr = new DayRange(); dr.Start = DateTimeUtil.GetStartOfDay(days[x]); dr.End = DateTimeUtil.GetEndOfDay(days[x]); ranges[x] = dr; } return ranges; }
public static DayRange[] DaysToDayRanges(DateTime[] days) { DayRange[] ranges = new DayRange[days.Length]; for (int x = 0; x < days.Length; x++) { DayRange dr = new DayRange(); dr.Start = DateTimeUtil.GetStartOfDay(days[x]); dr.End = DateTimeUtil.GetEndOfDay(days[x]); ranges[x] = dr; } return(ranges); }