Beispiel #1
0
        public void Plan(YearAndMonth startDate, YearAndMonth endDate)
        {
            var range = new YearsAndMonthsForRangeFinder().GetYearsAndMonthsForRange(startDate, endDate);

            foreach (var yearAndMonth in range)
            {
            }
        }
Beispiel #2
0
        public List <YearAndMonth> GetYearsAndMonthsForRange(YearAndMonth start, YearAndMonth end)
        {
            var result = new List <YearAndMonth>();

            var currentYearAndMonth = new YearAndMonth(start.Year, start.Month);

            while (currentYearAndMonth.IsLessThanOrEqualTo(end))
            {
                result.Add(currentYearAndMonth);
                currentYearAndMonth = currentYearAndMonth.AddOneMonth();
            }

            return(result);
        }