Example #1
0
        public IDictionary <string, Interval> GetIntervalsByMonth()
        {
            DateTime iterator = StartDate;
            var      names    = new Dictionary <string, Interval>();

            while (iterator <= EndDate)
            {
                var nextMonth = iterator.AddMonths(1);
                names.Add(DateTimeFormatHelper.GetMonthNameAndYear(iterator), new Interval(iterator, nextMonth.AddDays(-1)));
                iterator = nextMonth;
            }
            return(names);
        }
Example #2
0
 public string GetSingleMonthName()
 {
     return(DateTimeFormatHelper.GetMonthNameAndYear(StartDate));
 }