DateTimeFormatter.Format(ITemporalAccessor) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用此格式化程序设置日期时间对象的格式。
[Android.Runtime.Register("format", "(Ljava/time/temporal/TemporalAccessor;)Ljava/lang/String;", "", ApiSince=26)]
public string? Format(Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("format", "(Ljava/time/temporal/TemporalAccessor;)Ljava/lang/String;", "", ApiSince=26)>]
member this.Format : Java.Time.Temporal.ITemporalAccessor -> string
参数
- temporal
- ITemporalAccessor
要设置格式的临时对象,而不是 null
返回
带格式的字符串,而不是 null
- 属性
注解
使用此格式化程序设置日期时间对象的格式。
这会使用格式化程序的规则将日期时间设置为字符串。
Java文档java.time.format.DateTimeFormatter.format(java.time.temporal.TemporalAccessor)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。