语言

ZonedDateTime.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)>]
abstract member Format : Java.Time.Format.DateTimeFormatter -> string
override this.Format : Java.Time.Format.DateTimeFormatter -> string

参数

formatter
DateTimeFormatter

要使用的格式化程序,而不是 null

返回

格式的日期/时间字符串,而不是 null

实现

属性

注解

使用指定的格式化程序设置此日期时间的格式。 此日期时间将传递给格式化程序以生成字符串。

Java参考java.time.ZonedDateTime.format

适用于