Check if this DateTime is between fromDate and toDate,
optionally at part
Namespace: MomentSharpAssembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool IsBetween(
this DateTime dateTime,
DateTime fromDate,
DateTime toDate,
DateTimeParts part = DateTimeParts.None
)
<ExtensionAttribute>
Public Shared Function IsBetween (
dateTime As DateTime,
fromDate As DateTime,
toDate As DateTime,
Optional part As DateTimeParts = DateTimeParts.None
) As Boolean
public:
[ExtensionAttribute]
static bool IsBetween(
DateTime dateTime,
DateTime fromDate,
DateTime toDate,
DateTimeParts part = DateTimeParts::None
)
[<ExtensionAttribute>]
static member IsBetween :
dateTime : DateTime *
fromDate : DateTime *
toDate : DateTime *
?part : DateTimeParts
(* Defaults:
let _part = defaultArg part DateTimeParts.None
*)
-> bool
Parameters
- dateTime
- Type: SystemDateTime
this DateTime - fromDate
- Type: SystemDateTime
Start Date - toDate
- Type: SystemDateTime
End Date - part (Optional)
- Type: MomentSharpDateTimeParts
DateTimeParts
Return Value
Type:
Booleanboolean
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also