Rock.ExtensionMethods.EndOfWeek C# (CSharp) Method

EndOfWeek() public static method

Returns the date of the last day of the week for the specified date/time For example, if Monday is considered the start of the week: "2015-05-13" would return "2015-05-17" from http://stackoverflow.com/a/38064/1755417
public static EndOfWeek ( this dt, DayOfWeek startOfWeek ) : System.DateTime
dt this The dt.
startOfWeek DayOfWeek The start of week.
return System.DateTime
        public static DateTime EndOfWeek( this DateTime dt, DayOfWeek startOfWeek )
        {
            return dt.StartOfWeek( startOfWeek ).AddDays( 6 );
        }