Method TryParseDateTimeExact
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
TryParseDateTimeExact(string?, string, IFormatProvider, DateTimeStyles)
Parses a DateTime from this string in the given format, if it holds one.
[Pure]
public static Maybe<DateTime> TryParseDateTimeExact(this string? value, string format, IFormatProvider provider, DateTimeStyles styles)
Parameters
valuestringThe string to parse. A null string gives no value.
formatstringThe format
valuemust be in.providerIFormatProviderThe formatting information of the culture to read with.
stylesDateTimeStylesThe formatting options permitted in
value.
Returns
- Maybe<DateTime>
A Maybe<T> containing the parsed value, and one containing no value if
valueis not in that format.