C# Class DataServer.ExtensionMethods

Mostra file Open project: TNOCS/csTouch

Public Methods

Method Description
FromEpoch ( this unixTime ) : System.DateTime

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

ToEpoch ( this dt ) : long

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

ToRelativeDate ( this start, System.DateTime input ) : string

Method Details

FromEpoch() public static method

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

ToEpoch() public static method

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

ToRelativeDate() public static method

public static ToRelativeDate ( this start, System.DateTime input ) : string
start this
input System.DateTime
return string