C# Class Facebook.DateTimeConvertor

Utilities to convert dates to and from unix time.
Afficher le fichier Open project: liquidboy/X Class Usage Examples

Méthodes publiques

Méthode Description
FromIso8601FormattedDateTime ( string iso8601DateTime ) : System.DateTime

Converts ISO-8601 format (yyyy-MM-ddTHH:mm:ssZ) date time to DateTime.

FromUnixTime ( double unixTime ) : System.DateTime

Converts a unix time string to a DateTime object.

FromUnixTime ( string unixTime ) : System.DateTime

Converts a unix time string to a DateTime object.

ToIso8601FormattedDateTime ( System.DateTime dateTime ) : string

Converts to specified DateTime to ISO-8601 format (yyyy-MM-ddTHH:mm:ssZ).

ToUnixTime ( System.DateTime dateTime ) : double

Converts a DateTime object to unix time.

ToUnixTime ( DateTimeOffset dateTime ) : double

Converts a DateTimeOffset object to unix time.

Method Details

FromIso8601FormattedDateTime() public static méthode

Converts ISO-8601 format (yyyy-MM-ddTHH:mm:ssZ) date time to DateTime.
public static FromIso8601FormattedDateTime ( string iso8601DateTime ) : System.DateTime
iso8601DateTime string /// The ISO-8601 formatted date time. ///
Résultat System.DateTime

FromUnixTime() public static méthode

Converts a unix time string to a DateTime object.
public static FromUnixTime ( double unixTime ) : System.DateTime
unixTime double The unix time.
Résultat System.DateTime

FromUnixTime() public static méthode

Converts a unix time string to a DateTime object.
public static FromUnixTime ( string unixTime ) : System.DateTime
unixTime string The string representation of the unix time.
Résultat System.DateTime

ToIso8601FormattedDateTime() public static méthode

Converts to specified DateTime to ISO-8601 format (yyyy-MM-ddTHH:mm:ssZ).
public static ToIso8601FormattedDateTime ( System.DateTime dateTime ) : string
dateTime System.DateTime /// The date time. ///
Résultat string

ToUnixTime() public static méthode

Converts a DateTime object to unix time.
public static ToUnixTime ( System.DateTime dateTime ) : double
dateTime System.DateTime The date time.
Résultat double

ToUnixTime() public static méthode

Converts a DateTimeOffset object to unix time.
public static ToUnixTime ( DateTimeOffset dateTime ) : double
dateTime DateTimeOffset The date time.
Résultat double