public static DateTime GetFirstDayOfWeek(this DateTime date)
{
var dfi = DateTimeFormatInfo.CurrentInfo;
var firstDayOfWeek = date;
while (firstDayOfWeek.DayOfWeek != dfi.FirstDayOfWeek)
firstDayOfWeek= firstDayOfWeek.AddDays(-1);
return firstDayOfWeek;
}
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.