C# Class Microsoft.Phone.Controls.DateTimeFormatHelper

Show file Open project: nokiadatagathering/WP7-Official Class Usage Examples

Public Methods

Method 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

Method Description
GetSuperShortTime ( System.DateTime dt ) : string

Method Details

GetAbbreviatedDay() public static method

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

GetMonthAndDay() public static method

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

GetRelativeDayOfWeek() public static method

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.
return int

GetShortDate() public static method

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

GetShortTime() public static method

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

IsAnOlderWeek() public static method

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.
return bool

IsAnOlderYear() public static method

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.
return bool

IsAtLeastOneWeekOld() public static method

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.
return bool

IsCurrentCultureHungarian() public static method

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

IsCurrentCultureJapanese() public static method

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

IsCurrentCultureKorean() public static method

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

IsCurrentCultureTurkish() public static method

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

IsCurrentUICultureFrench() public static method

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

IsFutureDateTime() public static method

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.
return bool

IsPastDayOfWeek() public static method

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.
return bool

IsPastDayOfWeekWithWindow() public static method

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.
return bool