public static DateTime GetStartOfMonth(this DateTime dayWithinMonth) { return new DateTime(dayWithinMonth.Year, dayWithinMonth.Month, 1); }