/// <summary> /// Returns first next occurrence of specified <see cref="DayOfWeek"/>. /// </summary> public static DateTime Next(this DateTime start, DayOfWeek day) { do { start = start.AddDay(); }while (start.DayOfWeek != day); return(start); }
/// <summary> /// Returns first next occurrence of specified <see cref="DayOfWeek"/>. /// </summary> public static DateTime Next(this DateTime start, DayOfWeek day) { do { start = start.AddDay(); }while (start.DayOfWeek != day); return(start); }