DateTimePatternGenerator.GetBestPattern Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetBestPattern(String, DateTimePatternMatchOptions) |
Return the best pattern matching the input skeleton. |
GetBestPattern(String) |
Return the best pattern matching the input skeleton. |
GetBestPattern(String, DateTimePatternMatchOptions)
Return the best pattern matching the input skeleton.
[Android.Runtime.Register("getBestPattern", "(Ljava/lang/String;I)Ljava/lang/String;", "GetGetBestPattern_Ljava_lang_String_IHandler", ApiSince=24)]
public virtual string? GetBestPattern (string? skeleton, Android.Icu.Text.DateTimePatternMatchOptions options);
[<Android.Runtime.Register("getBestPattern", "(Ljava/lang/String;I)Ljava/lang/String;", "GetGetBestPattern_Ljava_lang_String_IHandler", ApiSince=24)>]
abstract member GetBestPattern : string * Android.Icu.Text.DateTimePatternMatchOptions -> string
override this.GetBestPattern : string * Android.Icu.Text.DateTimePatternMatchOptions -> string
Parameters
- skeleton
- String
The skeleton is a pattern containing only the variable fields. For example, "MMMdd" and "mmhh" are skeletons.
- options
- DateTimePatternMatchOptions
MATCH_xxx options for forcing the length of specified fields in the returned pattern to match those in the skeleton (when this would not happen otherwise). For default behavior, use MATCH_NO_OPTIONS.
Returns
Best pattern matching the input skeleton (and options).
- Attributes
Remarks
Return the best pattern matching the input skeleton. It is guaranteed to have all of the fields in the skeleton.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetBestPattern(String)
Return the best pattern matching the input skeleton.
[Android.Runtime.Register("getBestPattern", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetBestPattern_Ljava_lang_String_Handler", ApiSince=24)]
public virtual string? GetBestPattern (string? skeleton);
[<Android.Runtime.Register("getBestPattern", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetBestPattern_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member GetBestPattern : string -> string
override this.GetBestPattern : string -> string
Parameters
- skeleton
- String
The skeleton is a pattern containing only the variable fields. For example, "MMMdd" and "mmhh" are skeletons.
Returns
Best pattern matching the input skeleton.
- Attributes
Remarks
Return the best pattern matching the input skeleton. It is guaranteed to have all of the fields in the skeleton.
Example code:{
Java documentation for android.icu.text.DateTimePatternGenerator.getBestPattern(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.