Iso8601Utils.TryParse method
Namespace | Skybrud.Essentials.Time.Iso8601 |
---|---|
Assembly | Skybrud.Essentials.dll |
TryParse(string, out DateTime)
Converts the specified iso8601
formatted date and time to its DateTime
equivalent and returns a value that indicates whether the conversion
succeeded.
public static bool TryParse(string iso8601, DateTime result)
Parameters
iso8601
String
The string with the ISO 8601 formatted date and time.
Returns
true
if the iso8601
parameter was converted successfully; otherwise, false
.
TryParse(string, out DateTimeOffset)
Converts the specified iso8601
formatted date and time to its DateTimeOffset
equivalent and returns a value that indicates whether the conversion
succeeded.
public static bool TryParse(string iso8601, DateTimeOffset result)
Parameters
iso8601
String
The string with the ISO 8601 formatted date and time.
result
DateTimeOffset
When this method returns, contains the DateTimeOffset value
equivalent to the date and time contained in iso8601
, if the conversion succeeded, or
System.DateTimeOffset.MinValue
if the conversion failed.
Returns
true
if the iso8601
parameter was converted successfully; otherwise, false
.