示例#1
0
        /// <summary>
        /// Returns true if the time component of the specified DateTime is covered(included)
        /// by one of the HourList spans
        /// </summary>
        public bool IsCovered(DateTime when)
        {
            var ts = (int)when.TimeOfDay.TotalMinutes;

            return(Spans.Any(s => s.StartMinute <= ts && s.FinishMinute >= ts));
        }