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); }
/// <summary> /// Warning: bug found. dt.Offset may be incorrect as offsets could be different if range crosses daylight saving switch, i.e. October - December, or month of November in the EST USA. /// </summary> /// <param name="unit"></param> /// <param name="unitCount"></param> /// <param name="referenceMoment"></param> /// <returns></returns> public static TimeMomentRange Next(this TimeUnits unit, ulong unitCount = 1, DateTimeOffset?referenceMoment = null) { var span = new RelativeTimeSpan(Timeline.NextExcludingCurrent, unit, unitCount); TimeMomentRange range = span.GetTimeMomentRange(referenceMoment); return(range); }
/// <summary> /// Warning: bug found. dt.Offset may be incorrect as offsets could be different if range crosses daylight saving switch, i.e. October - December, or month of November in the EST USA. /// </summary> /// <param name="unit"></param> /// <param name="referenceMoment"></param> /// <returns></returns> public static TimeMomentRange ToDate(this TimeUnits unit, DateTimeOffset?referenceMoment = null) { var span = new RelativeTimeSpan(Timeline.ToDateOrTillSpecified, unit); TimeMomentRange range = span.GetTimeMomentRange(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; }
/// <summary> /// Warning: bug found. dt.Offset may be incorrect as offsets could be different if range crosses daylight saving switch, i.e. October - December, or month of November in the EST USA. /// </summary> /// <param name="unit"></param> /// <param name="referenceMoment"></param> /// <returns></returns> public static TimeMomentRange ToDate(this TimeUnits unit, DateTimeOffset? referenceMoment = null) { var span = new RelativeTimeSpan(Timeline.ToDateOrTillSpecified, unit); TimeMomentRange range = span.GetTimeMomentRange(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; }
/// <summary> /// Warning: bug found. dt.Offset may be incorrect as offsets could be different if range crosses daylight saving switch, i.e. October - December, or month of November in the EST USA. /// </summary> /// <param name="unit"></param> /// <param name="unitCount"></param> /// <param name="referenceMoment"></param> /// <returns></returns> public static TimeMomentRange Previous(this TimeUnits unit, ulong unitCount = 1, DateTimeOffset? referenceMoment = null) { var span = new RelativeTimeSpan(Timeline.PreviousExcludingCurrent, unit, unitCount); TimeMomentRange range = span.GetTimeMomentRange(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; }
/// <summary> /// Warning: bug found. dt.Offset may be incorrect as offsets could be different if range crosses daylight saving switch, i.e. October - December, or month of November in the EST USA. /// </summary> /// <param name="unit"></param> /// <param name="unitCount"></param> /// <param name="referenceMoment"></param> /// <returns></returns> public static TimeMomentRange Future(this TimeUnits unit, ulong unitCount = 1, DateTimeOffset? referenceMoment = null) { var span = new RelativeTimeSpan(Timeline.Future, unit, unitCount); TimeMomentRange range = span.GetTimeMomentRange(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; }