public static DateTime StartOfDay(this DateTime date) { return new DateTime(date.Year, date.Month, date.Day); }