NScrapeUtilityTryParseHttpDate Method |
Converts the specified HTTP string representation of a date and time to its
DateTime equivalent
Namespace:
NScrape
Assembly:
NScrape (in NScrape.dll) Version: 0.4.1.0
Syntax public static bool TryParseHttpDate(
string httpDate,
out DateTime parsedDate
)
Public Shared Function TryParseHttpDate (
httpDate As String,
<OutAttribute> ByRef parsedDate As DateTime
) As Boolean
public:
static bool TryParseHttpDate(
String^ httpDate,
[OutAttribute] DateTime% parsedDate
)
static member TryParseHttpDate :
httpDate : string *
parsedDate : DateTime byref -> bool
Parameters
- httpDate
- Type: SystemString
Contains the HTTP date string. - parsedDate
- Type: SystemDateTime
When this method returns, contains the DateTime value equivalent to the date and time
contained in httpDate, if the conversion succeeded, or MinValue if the conversion failed.
Return Value
Type:
Booleantrue if the date was successfully parsed;
false otherwise.
Remarks
Handles conversion of the HTTP date formats specified in section
7.1.1.1. Date/Time Formats of
RFC 7231.
See Also