Craig's Utility Library
4.0 Beta
|
Represents a date span More...
Public Member Functions | |
DateSpan (DateTime start, DateTime end) | |
Constructor More... | |
override bool | Equals (object obj) |
Determines if two objects are equal More... | |
override int | GetHashCode () |
Gets the hash code for the date span More... | |
DateSpan | Intersection (DateSpan Span) |
Returns the intersecting time span between the two values More... | |
bool | Overlap (DateSpan Span) |
Determines if two DateSpans overlap More... | |
override string | ToString () |
Converts the DateSpan to a string More... | |
Static Public Member Functions | |
static bool | operator!= (DateSpan Span1, DateSpan Span2) |
Determines if two DateSpans are not equal More... | |
static DateSpan | operator+ (DateSpan Span1, DateSpan Span2) |
Addition operator More... | |
static bool | operator== (DateSpan Span1, DateSpan Span2) |
Determines if two DateSpans are equal More... | |
static implicit | operator string (DateSpan Value) |
Converts the object to a string More... | |
Properties | |
virtual int | Days [get] |
Days between the two dates More... | |
virtual DateTime | End [get, protected set] |
End date More... | |
virtual int | Hours [get] |
Hours between the two dates More... | |
virtual int | MilliSeconds [get] |
Milliseconds between the two dates More... | |
virtual int | Minutes [get] |
Minutes between the two dates More... | |
virtual int | Months [get] |
Months between the two dates More... | |
virtual int | Seconds [get] |
Seconds between the two dates More... | |
virtual DateTime | Start [get, protected set] |
Start date More... | |
virtual int | Years [get] |
Years between the two dates More... | |
Represents a date span
Definition at line 30 of file DateSpan.cs.
Utilities.DataTypes.DateSpan.DateSpan | ( | DateTime | start, |
DateTime | end | ||
) |
Constructor
start | Start of the date span |
end | End of the date span |
Definition at line 37 of file DateSpan.cs.
override bool Utilities.DataTypes.DateSpan.Equals | ( | object | obj | ) |
Determines if two objects are equal
obj | Object to check |
Definition at line 150 of file DateSpan.cs.
override int Utilities.DataTypes.DateSpan.GetHashCode | ( | ) |
Gets the hash code for the date span
Definition at line 160 of file DateSpan.cs.
Returns the intersecting time span between the two values
Span | Span to use |
Definition at line 170 of file DateSpan.cs.
|
static |
Converts the object to a string
Value | Value to convert |
Definition at line 139 of file DateSpan.cs.
Determines if two DateSpans are not equal
Span1 | Span 1 |
Span2 | Span 2 |
Definition at line 95 of file DateSpan.cs.
Addition operator
Span1 | Span 1 |
Span2 | Span 2 |
Definition at line 106 of file DateSpan.cs.
Determines if two DateSpans are equal
Span1 | Span 1 |
Span2 | Span 2 |
Definition at line 125 of file DateSpan.cs.
bool Utilities.DataTypes.DateSpan.Overlap | ( | DateSpan | Span | ) |
Determines if two DateSpans overlap
Span | The span to compare to |
Definition at line 186 of file DateSpan.cs.
override string Utilities.DataTypes.DateSpan.ToString | ( | ) |
Converts the DateSpan to a string
Definition at line 196 of file DateSpan.cs.
|
get |
Days between the two dates
Definition at line 47 of file DateSpan.cs.
|
getprotected set |
End date
Definition at line 52 of file DateSpan.cs.
|
get |
Hours between the two dates
Definition at line 57 of file DateSpan.cs.
|
get |
Milliseconds between the two dates
Definition at line 62 of file DateSpan.cs.
|
get |
Minutes between the two dates
Definition at line 67 of file DateSpan.cs.
|
get |
Months between the two dates
Definition at line 72 of file DateSpan.cs.
|
get |
Seconds between the two dates
Definition at line 77 of file DateSpan.cs.
|
getprotected set |
Start date
Definition at line 82 of file DateSpan.cs.
|
get |
Years between the two dates
Definition at line 87 of file DateSpan.cs.