示例#1
0
        public IEnumerable <DateRange> SplitByHour()
        {
            if (Start.EndOfHour() == Stop.EndOfHour())
            {
                return new[] { this }
            }
            ;
            var t = Start.EndOfHour().AddTicks(1);

            return(new[] { new DateRange(Start, t) }.Concat(new DateRange(t, Stop).SplitByHour()));
        }