public static DateTime FloorQuarter(this DateTime date) { return new DateTime(date.Year, (((date.Month - 1) / 3) * 3 + 1), 1, 0, 0, 0, date.Kind); }