C# Класс Hawkeye.DateTimeExtensions

Some useful DateTime-related extension methods.
Показать файл Открыть проект

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

Метод Описание
ToLongInvariantString ( this dateTime ) : string

Converts the date to a long invariant string representation (format = "yyyy/MM/dd hh:mm:ss").

ToLongString ( this day ) : string

Formats the specified day as a long string.

ToLongString ( this day, CultureInfo culture ) : string

Formats the specified day as a long string.

ToShortInvariantString ( this dateTime ) : string

Converts the date to a short invariant string representation (format = "yyyy/MM/dd").

ToShortString ( this day ) : string

Formats the specified day as a short string (three letters).

ToShortString ( this day, CultureInfo culture ) : string

Formats the specified day as a short string (three letters).

ToVeryLongInvariantString ( this dateTime ) : string

Converts the date to a very long invariant string representation (format = "yyyy/MM/dd hh:mm:ss.FFFFFFF").

Приватные методы

Метод Описание
ToFormattedString ( this day, string format, CultureInfo culture ) : string

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

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

Converts the date to a long invariant string representation (format = "yyyy/MM/dd hh:mm:ss").
public static ToLongInvariantString ( this dateTime ) : string
dateTime this The date time to convert.
Результат string

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

Formats the specified day as a long string.
public static ToLongString ( this day ) : string
day this The day.
Результат string

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

Formats the specified day as a long string.
public static ToLongString ( this day, CultureInfo culture ) : string
day this The day.
culture System.Globalization.CultureInfo The culture.
Результат string

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

Converts the date to a short invariant string representation (format = "yyyy/MM/dd").
public static ToShortInvariantString ( this dateTime ) : string
dateTime this The date time to convert.
Результат string

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

Formats the specified day as a short string (three letters).
public static ToShortString ( this day ) : string
day this The day.
Результат string

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

Formats the specified day as a short string (three letters).
public static ToShortString ( this day, CultureInfo culture ) : string
day this The day.
culture System.Globalization.CultureInfo The culture.
Результат string

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

Converts the date to a very long invariant string representation (format = "yyyy/MM/dd hh:mm:ss.FFFFFFF").
public static ToVeryLongInvariantString ( this dateTime ) : string
dateTime this The date time to convert.
Результат string