Check if this DateTime is before compareDateTime, optionally at
part
Namespace: MomentSharpAssembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool IsBefore(
this DateTime dateTime,
DateTime compareDateTime,
DateTimeParts part = DateTimeParts.None
)
<ExtensionAttribute>
Public Shared Function IsBefore (
dateTime As DateTime,
compareDateTime As DateTime,
Optional part As DateTimeParts = DateTimeParts.None
) As Boolean
public:
[ExtensionAttribute]
static bool IsBefore(
DateTime dateTime,
DateTime compareDateTime,
DateTimeParts part = DateTimeParts::None
)
[<ExtensionAttribute>]
static member IsBefore :
dateTime : DateTime *
compareDateTime : DateTime *
?part : DateTimeParts
(* Defaults:
let _part = defaultArg part DateTimeParts.None
*)
-> bool
Parameters
- dateTime
- Type: SystemDateTime
this DateTime - compareDateTime
- Type: SystemDateTime
Compare 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).
Examples 10/20/2010 isBefore 12/31/2010, DateTimeParts.Year = false
Examples 10/20/2010 isBefore 01/01/2011, DateTimeParts.Year = true
See Also