Rfc2822Utils.TryParse method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time.Rfc2822
Assembly Skybrud.Essentials.dll

TryParse(string, out DateTime)

Static

Converts the specified rfc2822 formatted date to its DateTime equivalent and returns a value that indicates whether the conversion succeeded.

public static bool TryParse(string rfc2822, DateTime result)

Parameters

rfc2822 String

The string with the RFC 2822 formatted date.

result DateTime

When this method returns, contains the DateTime value equivalent to the date and time contained in rfc2822, if the conversion succeeded, or System.DateTime.MinValue if the conversion failed.

Returns

true if the rfc2822 parameter was converted successfully; otherwise, false.

TryParse(string, out DateTimeOffset)

Static

Converts the specified rfc2822 formatted date to its DateTimeOffset equivalent and returns a value that indicates whether the conversion succeeded.

public static bool TryParse(string rfc2822, DateTimeOffset result)

Parameters

rfc2822 String

The string with the RFC 2822 formatted date.

When this method returns, contains the DateTimeOffset value equivalent to the date and time contained in rfc2822, if the conversion succeeded, or System.DateTimeOffset.MinValue if the conversion failed.

Returns

true if the rfc2822 parameter was converted successfully; otherwise, false.