C# Class Aspectacular.RelativeTimeSpan

More intuitive time range specification, than start date - end date type of date/time range. For example, "PreviousExcludingCurrent 3 quarters", "Current week", "Past 48 hours".
Mostra file Open project: vgribok/Aspectacular Class Usage Examples

Public Properties

Property Type Description
Direction Timeline
Unit TimeUnits
UnitCount ulong

Public Methods

Method Description
GetDateTimeRange ( System.DateTime referenceMoment ) : DateRange
GetTimeMomentRange ( DateTimeOffset referenceMoment = null ) : TimeMomentRange

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.

RelativeTimeSpan ( Timeline direction, TimeUnits unit, ulong unitCount = 1 ) : System

Method Details

GetDateTimeRange() public method

public GetDateTimeRange ( System.DateTime referenceMoment ) : DateRange
referenceMoment System.DateTime
return DateRange

GetTimeMomentRange() public method

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.
public GetTimeMomentRange ( DateTimeOffset referenceMoment = null ) : TimeMomentRange
referenceMoment DateTimeOffset
return TimeMomentRange

RelativeTimeSpan() public method

public RelativeTimeSpan ( Timeline direction, TimeUnits unit, ulong unitCount = 1 ) : System
direction Timeline
unit TimeUnits
unitCount ulong
return System

Property Details

Direction public_oe property

public Timeline Direction
return Timeline

Unit public_oe property

public TimeUnits Unit
return TimeUnits

UnitCount public_oe property

public ulong UnitCount
return ulong