C# Class Microsoft.Phone.Controls.DateTimeFormatHelper

Afficher le fichier Open project: nokiadatagathering/WP7-Official Class Usage Examples

Méthodes publiques

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

Private Methods

Méthode Description
GetSuperShortTime ( System.DateTime dt ) : string

Method Details

GetAbbreviatedDay() public static méthode

Gets the abbreviated day from a T:System.DateTime object.
public static GetAbbreviatedDay ( System.DateTime dt ) : string
dt System.DateTime Date information.
Résultat string

GetMonthAndDay() public static méthode

Gets the month and day from a T:System.DateTime object.
public static GetMonthAndDay ( System.DateTime dt ) : string
dt System.DateTime Date information.
Résultat string

GetRelativeDayOfWeek() public static méthode

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

GetShortDate() public static méthode

Gets the date in short pattern from a T:System.DateTime object.
public static GetShortDate ( System.DateTime dt ) : string
dt System.DateTime Date information.
Résultat string

GetShortTime() public static méthode

Gets the time in short pattern from a T:System.DateTime object.
public static GetShortTime ( System.DateTime dt ) : string
dt System.DateTime Date information.
Résultat string

IsAnOlderWeek() public static méthode

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

IsAnOlderYear() public static méthode

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

IsAtLeastOneWeekOld() public static méthode

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

IsCurrentCultureHungarian() public static méthode

Identifies if the current culture is set to Hungarian.
public static IsCurrentCultureHungarian ( ) : bool
Résultat bool

IsCurrentCultureJapanese() public static méthode

Identifies if the current culture is set to Japanese.
public static IsCurrentCultureJapanese ( ) : bool
Résultat bool

IsCurrentCultureKorean() public static méthode

Identifies if the current culture is set to Korean.
public static IsCurrentCultureKorean ( ) : bool
Résultat bool

IsCurrentCultureTurkish() public static méthode

Identifies if the current culture is set to Turkish.
public static IsCurrentCultureTurkish ( ) : bool
Résultat bool

IsCurrentUICultureFrench() public static méthode

Identifies if the current UI culture is set to French.
public static IsCurrentUICultureFrench ( ) : bool
Résultat bool

IsFutureDateTime() public static méthode

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

IsPastDayOfWeek() public static méthode

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

IsPastDayOfWeekWithWindow() public static méthode

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