Android.Text.Format.DateFormat.GetBestDateTimePattern Method
Returns the best possible localized form of the given skeleton for the given locale.

Syntax

[Android.Runtime.Register("getBestDateTimePattern", "(Ljava/util/Locale;Ljava/lang/String;)Ljava/lang/String;", "")]
public static string GetBestDateTimePattern (Java.Util.Locale locale, string skeleton)

Parameters

locale
the locale into which the skeleton should be localized
skeleton
a skeleton as described above

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the best possible localized form of the given skeleton for the given locale. A skeleton is similar to, and uses the same format characters as, a Unicode pattern.

One difference is that order is irrelevant. For example, "MMMMd" will return "MMMM d" in the en_US locale, but "d. MMMM" in the de_CH locale.

Note also in that second example that the necessary punctuation for German was added. For the same input in es_ES, we'd have even more extra text: "d 'de' MMMM".

This method will automatically correct for grammatical necessity. Given the same "MMMMd" input, this method will return "d LLLL" in the fa_IR locale, where stand-alone months are necessary. Lengths are preserved where meaningful, so "Md" would give a different result to "MMMd", say, except in a locale such as ja_JP where there is only one length of month.

This method will only return patterns that are in CLDR, and is useful whenever you know what elements you want in your format string but don't want to make your code specific to any one locale.

[Android Documentation]

Requirements

Namespace: Android.Text.Format
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 18