Example #1
0
        /// <summary>
        /// Previous
        /// </summary>
        /// <param name="ldt"></param>
        /// <param name="dayOfWeek"></param>
        /// <returns></returns>
        public static LocalDateTime Previous(this LocalDateTime ldt, DayOfWeek dayOfWeek)
        {
            do
            {
                ldt = ldt.PreviousDay();
            } while (ldt.DayOfWeek != dayOfWeek.AsIsoDayOfWeek());

            return(ldt);
        }