ZonedDateTime.Parse 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Parse(String, DateTimeFormatter) | |
| Parse(ICharSequence, DateTimeFormatter) |
使用特定格式化器從文字串取得 ZonedDateTime 的實例。 |
| Parse(String) | |
| Parse(ICharSequence) |
可從文字串(如 2007-12-03T10:15:30+01:00[Europe/Paris])取得 ZonedDateTime 實例。 |
Parse(String, DateTimeFormatter)
public static Java.Time.ZonedDateTime? Parse(string? text, Java.Time.Format.DateTimeFormatter? formatter);
static member Parse : string * Java.Time.Format.DateTimeFormatter -> Java.Time.ZonedDateTime
參數
- text
- String
- formatter
- DateTimeFormatter
傳回
適用於
Parse(ICharSequence, DateTimeFormatter)
使用特定格式化器從文字串取得 ZonedDateTime 的實例。
[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;Ljava/time/format/DateTimeFormatter;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public static Java.Time.ZonedDateTime? Parse(Java.Lang.ICharSequence? text, Java.Time.Format.DateTimeFormatter? formatter);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;Ljava/time/format/DateTimeFormatter;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence * Java.Time.Format.DateTimeFormatter -> Java.Time.ZonedDateTime
參數
- text
- ICharSequence
要解析的文字,而非 null
- formatter
- DateTimeFormatter
格式化器要用,不是 null
傳回
解析後的分區日期時間,非空
- 屬性
備註
使用特定格式化器從文字串取得 ZonedDateTime 的實例。 文本會使用格式化器解析,回傳日期時間。
Java 參考 java.time.ZonedDateTime.parse。
適用於
Parse(String)
public static Java.Time.ZonedDateTime? Parse(string? text);
static member Parse : string -> Java.Time.ZonedDateTime
參數
- text
- String
傳回
適用於
Parse(ICharSequence)
可從文字串(如 2007-12-03T10:15:30+01:00[Europe/Paris])取得 ZonedDateTime 實例。
[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public static Java.Time.ZonedDateTime? Parse(Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence -> Java.Time.ZonedDateTime
參數
- text
- ICharSequence
解析文字,例如「2007-12-03T10:15:30+01:00[Europe/Paris]」,非空
傳回
解析後的分區日期時間,非空
- 屬性
備註
要加入。
Java 參考 java.time.ZonedDateTime.parse。