Instant.Parse Method

Definition

Overloads

Name Description
Parse(String)

Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z.

Parse(ICharSequence)

Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z.

Parse(String)

Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z.

public static Java.Time.Instant? Parse(string? text);
static member Parse : string -> Java.Time.Instant

Parameters

text
String

string: the text to parse, not null

Returns

the parsed instant, not null

Remarks

Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z. The string must represent a valid instant in UTC and is parsed using DateTimeFormatter.ISO_INSTANT.

Throws: DateTimeParseException if the text cannot be parsed

Android reference for java.time.Instant.parse.

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

Parse(ICharSequence)

Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z.

[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/Instant;", "", ApiSince=26)]
public static Java.Time.Instant? Parse(Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/Instant;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence -> Java.Time.Instant

Parameters

text
ICharSequence

ICharSequence: the text to parse, not null

Returns

the parsed instant, not null

Attributes

Remarks

Obtains an instance of Instant from a text string such as 2007-12-03T10:15:30.00Z. The string must represent a valid instant in UTC and is parsed using DateTimeFormatter.ISO_INSTANT.

Throws: DateTimeParseException if the text cannot be parsed

Android reference for java.time.Instant.parse.

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