C# Class Hawkeye.DateTimeExtensions

Some useful DateTime-related extension methods.
Afficher le fichier Open project: odalet/Hawkeye2

Méthodes publiques

Méthode Description
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").

Private Methods

Méthode Description
ToFormattedString ( this day, string format, CultureInfo culture ) : string

Method Details

ToLongInvariantString() public static méthode

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.
Résultat string

ToLongString() public static méthode

Formats the specified day as a long string.
public static ToLongString ( this day ) : string
day this The day.
Résultat string

ToLongString() public static méthode

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.
Résultat string

ToShortInvariantString() public static méthode

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.
Résultat string

ToShortString() public static méthode

Formats the specified day as a short string (three letters).
public static ToShortString ( this day ) : string
day this The day.
Résultat string

ToShortString() public static méthode

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.
Résultat string

ToVeryLongInvariantString() public static méthode

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.
Résultat string