Table of Contents

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

value string

The string to parse. A null string gives no value.

format string

The format value must be in.

provider IFormatProvider

The formatting information of the culture to read with.

styles DateTimeStyles

The formatting options permitted in value.

Returns

Maybe<DateTime>

A Maybe<T> containing the parsed value, and one containing no value if value is not in that format.

Remarks