C# Class Microsoft.Phone.Controls.RelativeTimeConverter

Time converter to display elapsed time relatively to the present.
Inheritance: IValueConverter
Show file Open project: Kinnara/WPToolkit

Public Methods

Method Description
Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Converts a T:System.DateTime object into a string the represents the elapsed time relatively to the present.

ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Not implemented.

Private Methods

Method Description
GetLastDayOfWeek ( DayOfWeek dow ) : string

Returns a localized text string for the "ast" + "day of week as {0}".

GetOnDayOfWeek ( DayOfWeek dow ) : string

Returns a localized text string to express "on {0}" where {0} is a day of the week, e.g. Sunday.

GetPluralMonth ( int month ) : string

Returns a localized text string to express months in plural.

GetPluralTimeUnits ( int units, string resources ) : string

Returns a localized text string to express time units in plural.

SetLocalizationCulture ( CultureInfo culture ) : void

Resources use the culture in the system locale by default. The converter must use the culture specified the ConverterCulture. The ConverterCulture defaults to en-US when not specified. Thus, change the resources culture only if ConverterCulture is set.

Method Details

Convert() public method

Converts a T:System.DateTime object into a string the represents the elapsed time relatively to the present.
public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The given date and time.
targetType System.Type /// The type corresponding to the binding property, which must be of /// . ///
parameter object (Not used).
culture System.Globalization.CultureInfo /// The culture to use in the converter. /// When not specified, the converter uses the current culture /// as specified by the system locale. ///
return object

ConvertBack() public method

Not implemented.
public ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object (Not used).
targetType System.Type (Not used).
parameter object (Not used).
culture System.Globalization.CultureInfo (Not used).
return object