DateTimeFormatter.IsoTime 属性

定义

格式化或分析时间的 ISO 时间格式化程序(如果有),如“10:15”、“10:15:30”或“10:15:30+01:00”。

[Android.Runtime.Register("ISO_TIME", ApiSince=26)]
public static Java.Time.Format.DateTimeFormatter? IsoTime { get; }
[<Android.Runtime.Register("ISO_TIME", ApiSince=26)>]
static member IsoTime : Java.Time.Format.DateTimeFormatter

属性值

属性

注解

格式化或分析时间的 ISO 时间格式化程序(如果有),如“10:15”、“10:15:30”或“10:15:30+01:00”。

这会返回一个不可变格式化程序,能够格式化和分析 ISO-8601 扩展偏移时间格式。 格式包括: <ul><li>The #ISO_LOCAL_TIME<li>If the offset is not available then the format is complete. <li>The ZoneOffset#getId() offset ID. 如果偏移量有秒,则即使这不是 ISO-8601 标准的一部分,也会处理这些偏移量。 分析不区分大小写。 </ul>

由于此格式化程序具有可选元素,因此可能需要使用 < a0/> 进行分析。

返回的格式化程序没有替代计时表或区域。 它使用 ResolverStyle#STRICT STRICT 解析程序样式。

Java文档java.time.format.DateTimeFormatter.ISO_TIME

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于