Exemplo n.º 1
0
        public IEnumerable <(DateTime start, DateTime end)> GetDatesIntervals()
        {
            var result = new List <(DateTime start, DateTime end)>();
            var pivot  = this.Start;

            for (int i = 0; i < this.Days; i++)
            {
                result.Add((pivot.Date, DateTimeUtils.AbsoluteEnd(pivot)));
                pivot = pivot.AddDays(1);
            }
            return(result);
        }
Exemplo n.º 2
0
        public IEnumerable <DatePeriodValue> GetDatesPeriods()
        {
            var result = new List <DatePeriodValue>();
            var pivot  = this.Start;

            for (int i = 0; i < this.Days; i++)
            {
                result.Add(new DatePeriodValue(pivot.Date, DateTimeUtils.AbsoluteEnd(pivot)));
                pivot = pivot.AddDays(1);
            }
            return(result);
        }
Exemplo n.º 3
0
 public DatePeriodValue(DateTime start) : this(start, DateTimeUtils.AbsoluteEnd(start))
 {
 }