C# Class TraktPlugin.TraktAPI.Extensions.DateTimeExtensions

Afficher le fichier Open project: trakt/Trakt-for-Mediaportal

Méthodes publiques

Méthode Description
FromEpoch ( this unixTime ) : System.DateTime

Long extension method to convert a Unix epoch time to a standard C# DateTime object.

FromISO8601 ( this dt ) : System.DateTime
OlsenToWindowsTimezone ( this olsenTimezone ) : string

Returns the corresponding Olsen timezone e.g. 'Atlantic/Canary' into a Windows timezone e.g. 'GMT Standard Time'

ToEpoch ( this dt ) : long

Date Time extension method to return a unix epoch time as a long

ToISO8601 ( this dt, double hourShift ) : string
ToISO8601 ( this dt, double hourShift, bool isLocal = false ) : string

Converts string DateTime to ISO8601 format 2014-09-01T09:10:11.000Z

ToLocalisedDayOfWeek ( this date ) : string

Method Details

FromEpoch() public static méthode

Long extension method to convert a Unix epoch time to a standard C# DateTime object.
public static FromEpoch ( this unixTime ) : System.DateTime
unixTime this
Résultat System.DateTime

FromISO8601() public static méthode

public static FromISO8601 ( this dt ) : System.DateTime
dt this
Résultat System.DateTime

OlsenToWindowsTimezone() public static méthode

Returns the corresponding Olsen timezone e.g. 'Atlantic/Canary' into a Windows timezone e.g. 'GMT Standard Time'
public static OlsenToWindowsTimezone ( this olsenTimezone ) : string
olsenTimezone this
Résultat string

ToEpoch() public static méthode

Date Time extension method to return a unix epoch time as a long
public static ToEpoch ( this dt ) : long
dt this
Résultat long

ToISO8601() public static méthode

public static ToISO8601 ( this dt, double hourShift ) : string
dt this
hourShift double
Résultat string

ToISO8601() public static méthode

Converts string DateTime to ISO8601 format 2014-09-01T09:10:11.000Z
public static ToISO8601 ( this dt, double hourShift, bool isLocal = false ) : string
dt this DateTime as string
hourShift double Number of hours to shift original time
isLocal bool
Résultat string

ToLocalisedDayOfWeek() public static méthode

public static ToLocalisedDayOfWeek ( this date ) : string
date this
Résultat string