/// <summary>
        /// Gets an instance of <see cref="OpeningHoursDay"/> representing the day at the specified <code>date</code>. If <strong>Require Holiday Dates</strong> has
        /// been checked in the pre-value editor, holidays will be taken into account as well.
        /// </summary>
        /// <param name="date">The date.</param>
        /// <returns>Returns an instance of <see cref="OpeningHoursDay"/> representing the day at the specified <code>date</code>.</returns>
        public OpeningHoursDay GetDay(DateTime date)
        {
            // Get information about the weekday (and whether it is a holiday)
            WeekdayOpeningHours woh = Weekdays[date.DayOfWeek];
            HolidayOpeningHours hoh = GetHoliday(date);

            // Initialize the instance for the day
            return(new OpeningHoursDay(date, woh, hoh));
        }
 public OpeningHoursDay(DateTime date, WeekdayOpeningHours weekday, HolidayOpeningHours holiday)
 {
     Date    = date;
     Weekday = weekday;
     Holiday = holiday;
     IsOpen  = holiday == null ? weekday.IsOpen : holiday.IsOpen;
     Label   = holiday == null ? null : holiday.Label;
     Opens   = date.Add(holiday == null ? weekday.Opens : holiday.Opens);
     Closes  = date.Add(holiday == null ? weekday.Closes : holiday.Closes);
 }