C# Class GitSharp.Core.Util.DateTimeExtensions

Mostrar archivo Open project: stschake/GitSharp

Public Methods

Method Description
MillisToDateTime ( this milliSecondsSinceEpoch ) : System.DateTime
MillisToDateTimeOffset ( this milliSecondsSinceEpoch, long offsetMinutes ) : DateTimeOffset
ToIsoDateFormat ( this when ) : string

Gets the DateTime in the sortable ISO format.

ToMillisecondsSinceEpoch ( this dateTimeOffset ) : long
ToUnixTime ( this datetime ) : int

Calculates the Unix time representation of a given DateTime. Unix time representation are the seconds since 1970.1.1 00:00:00 GMT. C# has a different representation: 100 nanosecs since 0001.1.1 12:00:00.

UnixTimeToDateTime ( this secondsSinceEpoch ) : System.DateTime

Calculates the DateTime of a given Unix time and time zone offset in minutes. Unix time representation are the seconds since 1970.1.1 00:00:00 GMT. C# has a different representation: 100 nanosecs since 0001.1.1 12:00:00.

UnixTimeToDateTimeOffset ( this secondsSinceEpoch, long offsetMinutes ) : DateTimeOffset

Calculates the DateTimeOffset of a given Unix time and time zone offset in minutes. Unix time representation are the seconds since 1970.1.1 00:00:00 GMT. C# has a different representation: 100 nanosecs since 0001.1.1 12:00:00.

Method Details

MillisToDateTime() public static method

public static MillisToDateTime ( this milliSecondsSinceEpoch ) : System.DateTime
milliSecondsSinceEpoch this
return System.DateTime

MillisToDateTimeOffset() public static method

public static MillisToDateTimeOffset ( this milliSecondsSinceEpoch, long offsetMinutes ) : DateTimeOffset
milliSecondsSinceEpoch this
offsetMinutes long
return DateTimeOffset

ToIsoDateFormat() public static method

Gets the DateTime in the sortable ISO format.
public static ToIsoDateFormat ( this when ) : string
when this
return string

ToMillisecondsSinceEpoch() public static method

public static ToMillisecondsSinceEpoch ( this dateTimeOffset ) : long
dateTimeOffset this
return long

ToUnixTime() public static method

Calculates the Unix time representation of a given DateTime. Unix time representation are the seconds since 1970.1.1 00:00:00 GMT. C# has a different representation: 100 nanosecs since 0001.1.1 12:00:00.
public static ToUnixTime ( this datetime ) : int
datetime this
return int

UnixTimeToDateTime() public static method

Calculates the DateTime of a given Unix time and time zone offset in minutes. Unix time representation are the seconds since 1970.1.1 00:00:00 GMT. C# has a different representation: 100 nanosecs since 0001.1.1 12:00:00.
public static UnixTimeToDateTime ( this secondsSinceEpoch ) : System.DateTime
secondsSinceEpoch this
return System.DateTime

UnixTimeToDateTimeOffset() public static method

Calculates the DateTimeOffset of a given Unix time and time zone offset in minutes. Unix time representation are the seconds since 1970.1.1 00:00:00 GMT. C# has a different representation: 100 nanosecs since 0001.1.1 12:00:00.
public static UnixTimeToDateTimeOffset ( this secondsSinceEpoch, long offsetMinutes ) : DateTimeOffset
secondsSinceEpoch this
offsetMinutes long
return DateTimeOffset