Example #1
0
        public List <TimePoint> CalculateAvailableSlots(int durationMinute)
        {
            List <TimePoint> result = new List <TimePoint>();

            int freeTimeDuration = GetDurationMinute();
            int numberOfSlot     = freeTimeDuration / durationMinute;
            int remainderMinutes = freeTimeDuration % durationMinute; //Split from the bottom

            for (int i = 0; i < numberOfSlot; i++)
            {
                result.Add(Start.AddMinute(i * durationMinute + remainderMinutes));
            }

            return(result);
        }