Any DateTime extension methods
More...
|
static bool | IsEqual (this DateTime val1, DateTime val2, bool checkDateComponent=true, bool checkTimeComponent=false) |
| Determines if 2 DateTimes are "equal" More...
|
|
static bool | IsLessThan (this DateTime val1, DateTime val2, bool checkDateComponent=true, bool checkTimeComponent=false) |
| Determines if a Datetime occurred before another More...
|
|
static bool | IsLessThanOrEqual (this DateTime val1, DateTime val2, bool checkDateComponent=true, bool checkTimeComponent=false) |
| Determines if a Datetime occurred before or at the same time as another More...
|
|
static bool | IsMoreThan (this DateTime val1, DateTime val2, bool checkDateComponent=true, bool checkTimeComponent=false) |
| Determines if a Datetime occurred after another More...
|
|
static bool | IsMoreThanOrEqual (this DateTime val1, DateTime val2, bool checkDateComponent=true, bool checkTimeComponent=false) |
| Determines if a Datetime occurred after or at the same time as another More...
|
|
static bool | Between (this DateTime val, DateTime val1, DateTime val2, bool checkDateComponent=true, bool checkTimeComponent=false, bool includeLowerValue=true, bool includeUpperValue=true) |
| Determines if a Datetime occurred in a date range More...
|
|
static DateTime | AsUtc (this DateTime val) |
| If the value is UTC, this formally makes it UTC More...
|
|
Any DateTime extension methods
◆ AsUtc()
static DateTime Sphyrnidae.Common.Extensions.DateTimeExtensions.AsUtc |
( |
this DateTime |
val | ) |
|
|
static |
If the value is UTC, this formally makes it UTC
- Parameters
-
val | The datetime value that was set via a UTC string |
- Returns
- A UTC DateTime
◆ Between()
static bool Sphyrnidae.Common.Extensions.DateTimeExtensions.Between |
( |
this DateTime |
val, |
|
|
DateTime |
val1, |
|
|
DateTime |
val2, |
|
|
bool |
checkDateComponent = true , |
|
|
bool |
checkTimeComponent = false , |
|
|
bool |
includeLowerValue = true , |
|
|
bool |
includeUpperValue = true |
|
) |
| |
|
static |
Determines if a Datetime occurred in a date range
- Parameters
-
val | The datetime for comparison |
val1 | The lower Datetime to compare |
val2 | The upper Datetime to compare |
checkDateComponent | If comparison will check the date component |
checkTimeComponent | If comparison will check the time component |
includeLowerValue | Specifies whether the check will include a value equal to val1 (lower) |
includeUpperValue | Specifies whether the check will include a value equal to val2 (upper) |
- Returns
- True if val falls between val1 and val2. False otherwise
◆ IsEqual()
static bool Sphyrnidae.Common.Extensions.DateTimeExtensions.IsEqual |
( |
this DateTime |
val1, |
|
|
DateTime |
val2, |
|
|
bool |
checkDateComponent = true , |
|
|
bool |
checkTimeComponent = false |
|
) |
| |
|
static |
Determines if 2 DateTimes are "equal"
- Parameters
-
val1 | The first Datetime to compare |
val2 | The 2nd Datetime to compare |
checkDateComponent | If comparison will check the date component |
checkTimeComponent | If comparison will check the time component |
- Returns
- True if equal, false otherwise
◆ IsLessThan()
static bool Sphyrnidae.Common.Extensions.DateTimeExtensions.IsLessThan |
( |
this DateTime |
val1, |
|
|
DateTime |
val2, |
|
|
bool |
checkDateComponent = true , |
|
|
bool |
checkTimeComponent = false |
|
) |
| |
|
static |
Determines if a Datetime occurred before another
- Parameters
-
val1 | The first Datetime to compare |
val2 | The 2nd Datetime to compare |
checkDateComponent | If comparison will check the date component |
checkTimeComponent | If comparison will check the time component |
- Returns
- True if first is less than the 2nd, false otherwise
◆ IsLessThanOrEqual()
static bool Sphyrnidae.Common.Extensions.DateTimeExtensions.IsLessThanOrEqual |
( |
this DateTime |
val1, |
|
|
DateTime |
val2, |
|
|
bool |
checkDateComponent = true , |
|
|
bool |
checkTimeComponent = false |
|
) |
| |
|
static |
Determines if a Datetime occurred before or at the same time as another
- Parameters
-
val1 | The first Datetime to compare |
val2 | The 2nd Datetime to compare |
checkDateComponent | If comparison will check the date component |
checkTimeComponent | If comparison will check the time component |
- Returns
- True if first is before or equal to the 2nd, false otherwise
◆ IsMoreThan()
static bool Sphyrnidae.Common.Extensions.DateTimeExtensions.IsMoreThan |
( |
this DateTime |
val1, |
|
|
DateTime |
val2, |
|
|
bool |
checkDateComponent = true , |
|
|
bool |
checkTimeComponent = false |
|
) |
| |
|
static |
Determines if a Datetime occurred after another
- Parameters
-
val1 | The first Datetime to compare |
val2 | The 2nd Datetime to compare |
checkDateComponent | If comparison will check the date component |
checkTimeComponent | If comparison will check the time component |
- Returns
- True if first is after than the 2nd, false otherwise
◆ IsMoreThanOrEqual()
static bool Sphyrnidae.Common.Extensions.DateTimeExtensions.IsMoreThanOrEqual |
( |
this DateTime |
val1, |
|
|
DateTime |
val2, |
|
|
bool |
checkDateComponent = true , |
|
|
bool |
checkTimeComponent = false |
|
) |
| |
|
static |
Determines if a Datetime occurred after or at the same time as another
- Parameters
-
val1 | The first Datetime to compare |
val2 | The 2nd Datetime to compare |
checkDateComponent | If comparison will check the date component |
checkTimeComponent | If comparison will check the time component |
- Returns
- True if first is after or equal to the 2nd, false otherwise
The documentation for this class was generated from the following file:
- C:/Users/dougb/Desktop/Sphyrnidae/New/Common/Common/Extensions/DateTimeExtensions.cs