private FloorWeek ( System.DateTime dateTime ) : System.DateTime | ||
dateTime | System.DateTime | |
return | System.DateTime |
private static DateTime FloorWeek(DateTime dateTime)
{
return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, 0, 0, 0, dateTime.Kind).AddDays(-(int) dateTime.DayOfWeek);
}
}
DateTimeExtensions::FloorWeek ( this date ) : DateTime? |