C# Класс Microsoft.Phone.Controls.DateTimeFormatHelper

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetAbbreviatedDay ( System.DateTime dt ) : string

Gets the abbreviated day from a T:System.DateTime object.

GetMonthAndDay ( System.DateTime dt ) : string

Gets the month and day from a T:System.DateTime object.

GetRelativeDayOfWeek ( System.DateTime dt ) : int

Gets the number representing the day of the week from a given T:System.DateTime object, relative to the first day of the week according to the current culture.

GetShortDate ( System.DateTime dt ) : string

Gets the date in short pattern from a T:System.DateTime object.

GetShortTime ( System.DateTime dt ) : string

Gets the time in short pattern from a T:System.DateTime object.

IsAnOlderWeek ( System.DateTime relative, System.DateTime given ) : bool

Indicates if a given T:System.DateTime object represents a past week when compared to another T:System.DateTime object.

IsAnOlderYear ( System.DateTime relative, System.DateTime given ) : bool

Indicates if a given T:System.DateTime object represents a past year when compared to another T:System.DateTime object.

IsAtLeastOneWeekOld ( System.DateTime relative, System.DateTime given ) : bool

Indicates if a given T:System.DateTime object is at least one week behind from another T:System.DateTime object.

IsCurrentCultureHungarian ( ) : bool

Identifies if the current culture is set to Hungarian.

IsCurrentCultureJapanese ( ) : bool

Identifies if the current culture is set to Japanese.

IsCurrentCultureKorean ( ) : bool

Identifies if the current culture is set to Korean.

IsCurrentCultureTurkish ( ) : bool

Identifies if the current culture is set to Turkish.

IsCurrentUICultureFrench ( ) : bool

Identifies if the current UI culture is set to French.

IsFutureDateTime ( System.DateTime relative, System.DateTime given ) : bool

Indicates if a given T:System.DateTime object represents a future instance when compared to another T:System.DateTime object.

IsPastDayOfWeek ( System.DateTime relative, System.DateTime given ) : bool

Indicates if a given T:System.DateTime object corresponds to a past day in the same week as another T:System.DateTime object.

IsPastDayOfWeekWithWindow ( System.DateTime relative, System.DateTime given ) : bool

Indicates if a given T:System.DateTime object corresponds to a past day in the same week as another T:System.DateTime object and at least three hours behind it.

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

Метод Описание
GetSuperShortTime ( System.DateTime dt ) : string

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

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

Gets the abbreviated day from a T:System.DateTime object.
public static GetAbbreviatedDay ( System.DateTime dt ) : string
dt System.DateTime Date information.
Результат string

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

Gets the month and day from a T:System.DateTime object.
public static GetMonthAndDay ( System.DateTime dt ) : string
dt System.DateTime Date information.
Результат string

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

Gets the number representing the day of the week from a given T:System.DateTime object, relative to the first day of the week according to the current culture.
public static GetRelativeDayOfWeek ( System.DateTime dt ) : int
dt System.DateTime Date information.
Результат int

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

Gets the date in short pattern from a T:System.DateTime object.
public static GetShortDate ( System.DateTime dt ) : string
dt System.DateTime Date information.
Результат string

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

Gets the time in short pattern from a T:System.DateTime object.
public static GetShortTime ( System.DateTime dt ) : string
dt System.DateTime Date information.
Результат string

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

Indicates if a given T:System.DateTime object represents a past week when compared to another T:System.DateTime object.
public static IsAnOlderWeek ( System.DateTime relative, System.DateTime given ) : bool
relative System.DateTime Relative date and time.
given System.DateTime Given date and time.
Результат bool

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

Indicates if a given T:System.DateTime object represents a past year when compared to another T:System.DateTime object.
public static IsAnOlderYear ( System.DateTime relative, System.DateTime given ) : bool
relative System.DateTime Relative date and time.
given System.DateTime Given date and time.
Результат bool

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

Indicates if a given T:System.DateTime object is at least one week behind from another T:System.DateTime object.
public static IsAtLeastOneWeekOld ( System.DateTime relative, System.DateTime given ) : bool
relative System.DateTime Relative date and time.
given System.DateTime Given date and time.
Результат bool

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

Identifies if the current culture is set to Hungarian.
public static IsCurrentCultureHungarian ( ) : bool
Результат bool

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

Identifies if the current culture is set to Japanese.
public static IsCurrentCultureJapanese ( ) : bool
Результат bool

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

Identifies if the current culture is set to Korean.
public static IsCurrentCultureKorean ( ) : bool
Результат bool

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

Identifies if the current culture is set to Turkish.
public static IsCurrentCultureTurkish ( ) : bool
Результат bool

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

Identifies if the current UI culture is set to French.
public static IsCurrentUICultureFrench ( ) : bool
Результат bool

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

Indicates if a given T:System.DateTime object represents a future instance when compared to another T:System.DateTime object.
public static IsFutureDateTime ( System.DateTime relative, System.DateTime given ) : bool
relative System.DateTime Relative date and time.
given System.DateTime Given date and time.
Результат bool

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

Indicates if a given T:System.DateTime object corresponds to a past day in the same week as another T:System.DateTime object.
public static IsPastDayOfWeek ( System.DateTime relative, System.DateTime given ) : bool
relative System.DateTime Relative date and time.
given System.DateTime Given date and time.
Результат bool

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

Indicates if a given T:System.DateTime object corresponds to a past day in the same week as another T:System.DateTime object and at least three hours behind it.
public static IsPastDayOfWeekWithWindow ( System.DateTime relative, System.DateTime given ) : bool
relative System.DateTime Relative date and time.
given System.DateTime Given date and time.
Результат bool