/// <summary>
        /// Trägt eine Ausnahmeregelung für einen bestimmten Tag ein.
        /// </summary>
        /// <param name="day">Der gewünschte Tag.</param>
        /// <param name="exception">Die Ausnahmeregel oder <i>null</i>, wenn für den Tag keine Ausnahme
        /// definiert werden soll.</param>
        public void SetException(DateTime day, VCRScheduleException exception)
        {
            // Remove the entry
            var date = day.Date;

            Exceptions.RemoveAll(e => e.When.Date == date);

            // Append
            if (exception != null)
            {
                if (exception.ShiftTime.HasValue || exception.Duration.HasValue)
                {
                    Exceptions.Add(exception);
                }
            }
        }
        /// <summary>
        /// Erstellt eine neue Ausnahmebeschreibung.
        /// </summary>
        /// <param name="exception">Die Ausnahmedaten.</param>
        /// <param name="schedule">Die zugehörige Aufzeichnung.</param>
        private PlanException( VCRScheduleException exception, VCRSchedule schedule )
        {
            // Remember
            ExceptionDurationDelta = exception.Duration.GetValueOrDefault( schedule.Duration ) - schedule.Duration;
            ExceptionDate = new DateTime( exception.When.Date.Ticks, DateTimeKind.Utc );
            ExceptionStartShift = exception.ShiftTime.GetValueOrDefault( 0 );

            // Start berechnen
            PlannedStart = (new DateTime( exception.When.Date.Ticks, DateTimeKind.Local ) + schedule.FirstStart.ToLocalTime().TimeOfDay).ToUniversalTime();
            PlannedDuration = schedule.Duration;
        }
        /// <summary>
        /// Trägt eine Ausnahmeregelung für einen bestimmten Tag ein.
        /// </summary>
        /// <param name="day">Der gewünschte Tag.</param>
        /// <param name="exception">Die Ausnahmeregel oder <i>null</i>, wenn für den Tag keine Ausnahme
        /// definiert werden soll.</param>
        public void SetException( DateTime day, VCRScheduleException exception )
        {
            // Remove the entry
            var date = day.Date;
            Exceptions.RemoveAll( e => e.When.Date == date );

            // Append
            if (exception != null)
                if (exception.ShiftTime.HasValue || exception.Duration.HasValue)
                    Exceptions.Add( exception );
        }
        /// <summary>
        /// Erstellt eine neue Ausnahmebeschreibung.
        /// </summary>
        /// <param name="exception">Die Ausnahmedaten.</param>
        /// <param name="schedule">Die zugehörige Aufzeichnung.</param>
        /// <returns>Die neue Ausnahmebeschreibung.</returns>
        public static PlanException Create( VCRScheduleException exception, VCRSchedule schedule )
        {
            // Validate
            if (exception == null)
                throw new ArgumentNullException( nameof( exception ) );
            if (schedule == null)
                throw new ArgumentNullException( nameof( schedule ) );

            // Forward
            return new PlanException( exception, schedule );
        }