DateTimeFormatter.ParseBest 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
| Name | Description |
|---|---|
| ParseBest(ICharSequence, ITemporalQuery[]) |
Fully parses the text and tries the specified queries in order. |
| ParseBest(String, ITemporalQuery[]) |
Fully parses the text and tries the specified queries in order. |
ParseBest(ICharSequence, ITemporalQuery[])
Fully parses the text and tries the specified queries in order.
[Android.Runtime.Register("parseBest", "(Ljava/lang/CharSequence;[Ljava/time/temporal/TemporalQuery;)Ljava/time/temporal/TemporalAccessor;", "", ApiSince=26)]
public Java.Time.Temporal.ITemporalAccessor? ParseBest(Java.Lang.ICharSequence? text, params Java.Time.Temporal.ITemporalQuery[]? queries);
[<Android.Runtime.Register("parseBest", "(Ljava/lang/CharSequence;[Ljava/time/temporal/TemporalQuery;)Ljava/time/temporal/TemporalAccessor;", "", ApiSince=26)>]
member this.ParseBest : Java.Lang.ICharSequence * Java.Time.Temporal.ITemporalQuery[] -> Java.Time.Temporal.ITemporalAccessor
Parameters
- text
- ICharSequence
the text to parse, not null
- queries
- ITemporalQuery[]
the queries to use, at least two queries must be specified, not null
Returns
The first result that implements ITemporalAccessor, or null if a query returns null first.
- Attributes
Remarks
The queries are tried in order until one returns a temporal object or null. Results of other types and runtime exceptions from queries are ignored.
Applies to
ParseBest(String, ITemporalQuery[])
Fully parses the text and tries the specified queries in order.
public Java.Time.Temporal.ITemporalAccessor? ParseBest(string? text, params Java.Time.Temporal.ITemporalQuery[]? queries);
member this.ParseBest : string * Java.Time.Temporal.ITemporalQuery[] -> Java.Time.Temporal.ITemporalAccessor
Parameters
- text
- String
the text to parse, not null
- queries
- ITemporalQuery[]
the queries to use, at least two queries must be specified, not null
Returns
The first result that implements ITemporalAccessor, or null if a query returns null first.
Remarks
The queries are tried in order until one returns a temporal object or null. Results of other types and runtime exceptions from queries are ignored.