ThisWeekMonday

public static DateTime ThisWeekMonday(this DateTime dt)
{
   var today = DateTime.Now;
   return new GregorianCalendar().AddDays(today, -((int)today.DayOfWeek) + 1);
}
Example:
var monday = DateTime.Now.ThisWeekMonday();

Description

Returns a DateTime representing the Monday of the current week. Depends on System.Globalization

Details

Double click on the code to select all.

 

;