Partager via


DateIntervalFormat.ParseObject(String, ParsePosition) Method

Definition

Caution

deprecated

Date interval parsing is not supported.

[Android.Runtime.Register("parseObject", "(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/lang/Object;", "GetParseObject_Ljava_lang_String_Ljava_text_ParsePosition_Handler", ApiSince=24)]
[System.Obsolete("deprecated")]
public override Java.Lang.Object? ParseObject (string? source, Java.Text.ParsePosition? parse_pos);
[<Android.Runtime.Register("parseObject", "(Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/lang/Object;", "GetParseObject_Ljava_lang_String_Ljava_text_ParsePosition_Handler", ApiSince=24)>]
[<System.Obsolete("deprecated")>]
override this.ParseObject : string * Java.Text.ParsePosition -> Java.Lang.Object

Parameters

source
String

The string to be parsed into an object.

parse_pos
ParsePosition

The position to start parsing at. Since no parsing is supported, upon return this param is unchanged.

Returns

A newly created Formattable object, or NULL on failure.

Attributes

Remarks

Date interval parsing is not supported.

This method should handle parsing of date time interval strings into Formattable objects with DateInterval type, which is a pair of UDate.

Before calling, set parse_pos.index to the offset you want to start parsing at in the source. After calling, parse_pos.index is the end of the text you parsed. If error occurs, index is unchanged.

When parsing, leading whitespace is discarded (with a successful parse), while trailing whitespace is left as is.

See Format.parseObject() for more.

This member is deprecated. This API is ICU internal only.

Java documentation for android.icu.text.DateIntervalFormat.parseObject(java.lang.String, java.text.ParsePosition).

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