C# Класс GitSharp.Core.Util.DateTimeExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

MillisToDateTime() публичный статический Метод

public static MillisToDateTime ( this milliSecondsSinceEpoch ) : System.DateTime
milliSecondsSinceEpoch this
Результат System.DateTime

MillisToDateTimeOffset() публичный статический Метод

public static MillisToDateTimeOffset ( this milliSecondsSinceEpoch, long offsetMinutes ) : DateTimeOffset
milliSecondsSinceEpoch this
offsetMinutes long
Результат DateTimeOffset

ToIsoDateFormat() публичный статический Метод

Gets the DateTime in the sortable ISO format.
public static ToIsoDateFormat ( this when ) : string
when this
Результат string

ToMillisecondsSinceEpoch() публичный статический Метод

public static ToMillisecondsSinceEpoch ( this dateTimeOffset ) : long
dateTimeOffset this
Результат long

ToUnixTime() публичный статический Метод

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
Результат int

UnixTimeToDateTime() публичный статический Метод

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
Результат System.DateTime

UnixTimeToDateTimeOffset() публичный статический Метод

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
Результат DateTimeOffset