JObjectExtensions.GetDateTime method
Namespace | Skybrud.Essentials.Json.Extensions |
---|---|
Assembly | Skybrud.Essentials.dll |
GetDateTime(JObject, string)
Gets an instance of DateTime from the value of the token matching the specified
path
.
public static DateTime GetDateTime(this JObject obj, string path)
Parameters
GetDateTime(JObject, string, DateTimeStyles)
Gets an instance of DateTime from the value of the token matching the specified
path
.
public static DateTime GetDateTime(this JObject obj, string path, DateTimeStyles styles)
Parameters
styles
DateTimeStyles
A bitwise combination of the enumeration values that indicates the style elements that
can be present in the property value for the parse operation to succeed and that defines how to interpret
the parsed date in relation to the current time zone or the current date. A typical value to specify is
System.Globalization.DateTimeStyles.None
.
GetDateTime(JObject, string, IFormatProvider, DateTimeStyles)
Gets an instance of DateTime from the value of the token matching the specified
path
.
public static DateTime GetDateTime(this JObject obj, string path, IFormatProvider provider, DateTimeStyles styles)
Parameters
provider
IFormatProvider
An object that supplies culture-specific formatting information about the property value.
styles
DateTimeStyles
A bitwise combination of the enumeration values that indicates the style elements
that can be present in the property value for the parse operation to succeed and that defines how to
interpret the parsed date in relation to the current time zone or the current date. A typical value to
specify is System.Globalization.DateTimeStyles.None
.