GetDateTimeRange() public method

public GetDateTimeRange ( System.DateTime referenceMoment ) : DateRange
referenceMoment System.DateTime
return DateRange
        public static DateRange Next(this TimeUnits unit, ulong unitCount, DateTime?referenceMoment)
        {
            var       span  = new RelativeTimeSpan(Timeline.NextExcludingCurrent, unit, unitCount);
            DateRange range = span.GetDateTimeRange(referenceMoment);

            return(range);
        }
        public static DateRange ToDate(this TimeUnits unit, DateTime?referenceMoment)
        {
            var       span  = new RelativeTimeSpan(Timeline.ToDateOrTillSpecified, unit);
            DateRange range = span.GetDateTimeRange(referenceMoment);

            return(range);
        }
        public static DateRange Current(this TimeUnits unit, DateTime?referenceMoment)
        {
            var       span  = new RelativeTimeSpan(Timeline.EntireCurrentOrSpecified, unit);
            DateRange range = span.GetDateTimeRange(referenceMoment);

            return(range);
        }
 public static DateRange ToDate(this TimeUnits unit, DateTime? referenceMoment)
 {
     var span = new RelativeTimeSpan(Timeline.ToDateOrTillSpecified, unit);
     DateRange range = span.GetDateTimeRange(referenceMoment);
     return range;
 }
 public static DateRange Previous(this TimeUnits unit, ulong unitCount, DateTime? referenceMoment)
 {
     var span = new RelativeTimeSpan(Timeline.PreviousExcludingCurrent, unit, unitCount);
     DateRange range = span.GetDateTimeRange(referenceMoment);
     return range;
 }
 public static DateRange Future(this TimeUnits unit, ulong unitCount, DateTime? referenceMoment)
 {
     var span = new RelativeTimeSpan(Timeline.Future, unit, unitCount);
     DateRange range = span.GetDateTimeRange(referenceMoment);
     return range;
 }
 public static DateRange Current(this TimeUnits unit, DateTime? referenceMoment)
 {
     var span = new RelativeTimeSpan(Timeline.EntireCurrentOrSpecified, unit);
     DateRange range = span.GetDateTimeRange(referenceMoment);
     return range;
 }