LocalTime.Parse 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 |
|---|---|
| Parse(ICharSequence) |
Obtains an instance of LocalTime from a text string such as 10:15. |
| Parse(String) | |
| Parse(ICharSequence, DateTimeFormatter) |
Obtains an instance of LocalTime from a text string using a specific formatter. |
| Parse(String, DateTimeFormatter) |
Parse(ICharSequence)
Obtains an instance of LocalTime from a text string such as 10:15.
[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/LocalTime;", "", ApiSince=26)]
public static Java.Time.LocalTime? Parse(Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/LocalTime;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence -> Java.Time.LocalTime
Parameters
- text
- ICharSequence
the text to parse such as "10:15:30", not null
Returns
the parsed local time, not null
- Attributes
Remarks
Obtains an instance of LocalTime from a text string such as 10:15. The string must represent a valid time and is parsed using DateTimeFormatter.ISO_LOCAL_TIME.
Java reference for java.time.LocalTime.parse.
Applies to
Parse(ICharSequence, DateTimeFormatter)
Obtains an instance of LocalTime from a text string using a specific formatter.
[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;Ljava/time/format/DateTimeFormatter;)Ljava/time/LocalTime;", "", ApiSince=26)]
public static Java.Time.LocalTime? Parse(Java.Lang.ICharSequence? text, Java.Time.Format.DateTimeFormatter? formatter);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;Ljava/time/format/DateTimeFormatter;)Ljava/time/LocalTime;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence * Java.Time.Format.DateTimeFormatter -> Java.Time.LocalTime
Parameters
- text
- ICharSequence
the text to parse, not null
- formatter
- DateTimeFormatter
the formatter to use, not null
Returns
the parsed local time, not null
- Attributes
Remarks
Obtains an instance of LocalTime from a text string using a specific formatter. The text is parsed using the formatter, returning a time.
Java reference for java.time.LocalTime.parse.
Applies to
Parse(String, DateTimeFormatter)
public static Java.Time.LocalTime? Parse(string? text, Java.Time.Format.DateTimeFormatter? formatter);
static member Parse : string * Java.Time.Format.DateTimeFormatter -> Java.Time.LocalTime
Parameters
- text
- String
- formatter
- DateTimeFormatter