語言

Year.Format(DateTimeFormatter) 方法

定義

今年使用指定的格式化器。

[Android.Runtime.Register("format", "(Ljava/time/format/DateTimeFormatter;)Ljava/lang/String;", "", ApiSince=26)]
public string? Format(Java.Time.Format.DateTimeFormatter? formatter);
[<Android.Runtime.Register("format", "(Ljava/time/format/DateTimeFormatter;)Ljava/lang/String;", "", ApiSince=26)>]
member this.Format : Java.Time.Format.DateTimeFormatter -> string

參數

formatter
DateTimeFormatter

格式化器要用,不是 null

傳回

格式化年份字串,非空字串

屬性

備註

今年使用指定的格式化器。 今年將交由格式製作者製作字串。

Java 參考 java.time.Year.format

適用於