public static Func <DateTime, int> GetAmountOfTimeFunction(EGrouppedTimeInterval grouppedInterval)
        {
            if (grouppedInterval == EGrouppedTimeInterval.DayOfWeek)
            {
                return(date => date.DayOfWeek.ToIndex());
            }

            return(TimeIntervalHelper.GetAmountOfTimeFunction(ToTimeInterval(grouppedInterval)));
        }
        public GrouppedDateIntervals(DateTime startUtc, DateTime endUtc, EGrouppedTimeInterval grouppedTimeInterval)
        {
            _timeInterval = grouppedTimeInterval;

            var timeInterval = GrouppedTimeIntervalHelper.ToTimeInterval(grouppedTimeInterval);

            _startUtc = TimeIntervalHelper.ResetDateTime(startUtc, timeInterval);
            _endUtc   = TimeIntervalHelper.ResetDateTime(endUtc, timeInterval);

            _intervals = GenerateIntervals();
        }
 public static int GetMaximumAmountOfTime(EGrouppedTimeInterval grouppedInterval) => (grouppedInterval == EGrouppedTimeInterval.DayOfWeek) ? 7 : TimeIntervalHelper.GetMaximumAmountOfTime(ToTimeInterval(grouppedInterval));
 public static Func <DateTime, DateTime> AddOneAmountOfTimeFunction(EGrouppedTimeInterval grouppedInterval) => TimeIntervalHelper.AddOneAmountOfTimeFunction(ToTimeInterval(grouppedInterval));