Class SyndicationDateTimeUtility
Provides methods for generating and parsing date-time information exposed by syndicated content. This class cannot be inherited.
Inheritance
Inherited Members
Namespace: Argotic.Common
Assembly: Argotic.Common.dll
Syntax
public static class SyndicationDateTimeUtility
Remarks
See RFC #822: Standard for ARPA Internet Text Messages (Date and Time Specification) and RFC #3339: Date and Time on the Internet (Timestamps) for further information about the date-time formats implemented in the SyndicationDateTimeUtility class.
Methods
| Improve this Doc View SourceParseRfc3339DateTime(String)
Converts the specified string representation of a RFC-3339 formatted date to its System.DateTime equivalent.
Declaration
public static DateTime ParseRfc3339DateTime(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A string containing a RFC-3339 formatted date to convert. |
Returns
Type | Description |
---|---|
System.DateTime | A System.DateTime equivalent to the RFC-3339 formatted date contained in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
System.FormatException | The |
ParseRfc822DateTime(String)
Converts the specified string representation of a RFC-822 formatted date to its System.DateTime equivalent.
Declaration
public static DateTime ParseRfc822DateTime(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A string containing a RFC-822 formatted date to convert. |
Returns
Type | Description |
---|---|
System.DateTime | A System.DateTime equivalent to the RFC-822 formatted date contained in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
System.FormatException | The |
ToRfc3339DateTime(DateTime)
Converts the value of the supplied System.DateTime object to its equivalent RFC-3339 date string representation.
Declaration
public static string ToRfc3339DateTime(DateTime utcDateTime)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | utcDateTime | The UTC System.DateTime object to convert. |
Returns
Type | Description |
---|---|
System.String | A string that contains the RFC-3339 date string representation of the supplied System.DateTime object. |
ToRfc822DateTime(DateTime)
Converts the value of the supplied System.DateTime object to its equivalent RFC-822 date string representation.
Declaration
public static string ToRfc822DateTime(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | dateTime | The System.DateTime object to convert. |
Returns
Type | Description |
---|---|
System.String | A string that contains the RFC-822 date string representation of the supplied System.DateTime object. |
TryParseRfc3339DateTime(String, out DateTime)
Converts the specified string representation of a RFC-3339 formatted date to its System.DateTime equivalent.
Declaration
public static bool TryParseRfc3339DateTime(string value, out DateTime result)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A string containing a RFC-3339 formatted date to convert. |
System.DateTime | result | When this method returns, contains the System.DateTime value equivalent to the date and time contained in |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
TryParseRfc822DateTime(String, out DateTime)
Converts the specified string representation of a RFC-822 formatted date to its System.DateTime equivalent.
Declaration
public static bool TryParseRfc822DateTime(string value, out DateTime result)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A string containing a RFC-822 formatted date to convert. |
System.DateTime | result | When this method returns, contains the System.DateTime value equivalent to the date and time contained in |
Returns
Type | Description |
---|---|
System.Boolean | true if the |