Class HttpDate
Provides standard methods to parse and format
Inherited Members
Namespace: EmbedIO.Utilities
Syntax
public static class HttpDate
Methods
Format(DateTime)
Formats the specified
Declaration
public static string Format(DateTime dateTime)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | dateTime | The |
Returns
| Type | Description |
|---|---|
| String | A string containing the formatted |
Format(DateTimeOffset)
Formats the specified
Declaration
public static string Format(DateTimeOffset dateTimeOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | dateTimeOffset | The |
Returns
| Type | Description |
|---|---|
| String | A string containing the formatted |
TryParse(String, out DateTimeOffset)
Attempts to parse a string containing a date and time, and possibly a time zone offset,
in one of the formats specified in RFC850,
RFC1123,
and RFC5322,
or ANSI C's asctime()https://linux.die.net/man/3/asctime format.
Declaration
public static bool TryParse(string str, out DateTimeOffset result)
Parameters
| Type | Name | Description |
|---|---|---|
| String | str | The string to parse. |
| DateTimeOffset | result | When this method returns true,
a |
Returns
| Type | Description |
|---|---|
| Boolean | true if |