public static DateAndOrTime Create(
DateTimeOffset value,
bool ignoreYear = false,
bool ignoreMonth = false,
bool ignoreDay = false
)
Public Shared Function Create (
value As DateTimeOffset,
Optional ignoreYear As Boolean = false,
Optional ignoreMonth As Boolean = false,
Optional ignoreDay As Boolean = false
) As DateAndOrTime
public:
static DateAndOrTime^ Create(
DateTimeOffset value,
bool ignoreYear = false,
bool ignoreMonth = false,
bool ignoreDay = false
)
static member Create :
value : DateTimeOffset *
?ignoreYear : bool *
?ignoreMonth : bool *
?ignoreDay : bool
(* Defaults:
let _ignoreYear = defaultArg ignoreYear false
let _ignoreMonth = defaultArg ignoreMonth false
let _ignoreDay = defaultArg ignoreDay false
*)
-> DateAndOrTime
If value has neither a date nor a time, the method returns an empty instance.
If ignoreDay is true and ignoreMonth or ignoreYear is false, the time component is ignored and the newly created instance will encapsulate a DateOnly value.