ISO 8601小时数不一致
ISO 8601 hour number inconsistency
ISO 8601,第 5.3 节规定
hours are represented by two digits from [01] to [24]
但下面的第 5.3.2 节允许午夜使用“00:00:00”和“24:00:00”。
我还从经验中知道,午夜通常用数字 [00] 表示,而从不用 [24] 表示,除非在午夜的确切秒数。所以这似乎是规范中的一个错误。肯定有人在我之前注意到了这一点。是否有已发布的勘误表?我错过了什么吗?
我不知道最新的 ISO-8601 论文中的第 5.3 节,但请参阅:
4.2.3 Midnight
The complete representations in basic and extended format for midnight, in accordance with 4.2.2, shall be expressed in
either of the two following ways:
Basic format Extended format
a) 000000 00:00:00 (the beginning of a calendar day)
b) 240000 24:00:00 (the end of a calendar day)
The representations may have reduced
accuracy in accordance with 4.2.2.3 or may be designated as a time
expression in accordance with 4.2.2.5. To represent midnight the
representations may be expanded with a decimal fraction containing
only zeros in accordance with 4.2.2.4.
NOTE 1 Midnight will normally be represented as [00:00] or [24:00].
NOTE 2 The end of one calendar day [24:00] coincides with [00:00] at the start of the next calendar
day, e.g. [24:00] on 12 April 1985 is the same as [00:00] on 13 April
1985. If there is no association with a date or a time interval both a) and b) represent the same local time in the 24-hour timekeeping
system.
NOTE 3 The choice of representation a) or b) will depend upon
any association with a date, or a time interval. Representations where
[hh] has the value [24] are only preferred to represent the end of a time interval in accordance with 4.4 or recurring time interval in accordance with 4.5.
所以我觉得一切都很好,没有矛盾。
顺便说一句,我在我的Java时间库Time4J(参见classnet.time4j.PlainTime
)中修改了这个特殊值24:00,以启用更优雅的时间间隔描述.而且我也从现实生活中知道这样的小时值并不罕见(例如在商店营业时间)。
ISO 8601,第 5.3 节规定
hours are represented by two digits from [01] to [24]
但下面的第 5.3.2 节允许午夜使用“00:00:00”和“24:00:00”。
我还从经验中知道,午夜通常用数字 [00] 表示,而从不用 [24] 表示,除非在午夜的确切秒数。所以这似乎是规范中的一个错误。肯定有人在我之前注意到了这一点。是否有已发布的勘误表?我错过了什么吗?
我不知道最新的 ISO-8601 论文中的第 5.3 节,但请参阅:
4.2.3 Midnight
The complete representations in basic and extended format for midnight, in accordance with 4.2.2, shall be expressed in either of the two following ways:
Basic format Extended format a) 000000 00:00:00 (the beginning of a calendar day) b) 240000 24:00:00 (the end of a calendar day)
The representations may have reduced accuracy in accordance with 4.2.2.3 or may be designated as a time expression in accordance with 4.2.2.5. To represent midnight the representations may be expanded with a decimal fraction containing only zeros in accordance with 4.2.2.4.
NOTE 1 Midnight will normally be represented as [00:00] or [24:00].
NOTE 2 The end of one calendar day [24:00] coincides with [00:00] at the start of the next calendar day, e.g. [24:00] on 12 April 1985 is the same as [00:00] on 13 April 1985. If there is no association with a date or a time interval both a) and b) represent the same local time in the 24-hour timekeeping system.
NOTE 3 The choice of representation a) or b) will depend upon any association with a date, or a time interval. Representations where [hh] has the value [24] are only preferred to represent the end of a time interval in accordance with 4.4 or recurring time interval in accordance with 4.5.
所以我觉得一切都很好,没有矛盾。
顺便说一句,我在我的Java时间库Time4J(参见classnet.time4j.PlainTime
)中修改了这个特殊值24:00,以启用更优雅的时间间隔描述.而且我也从现实生活中知道这样的小时值并不罕见(例如在商店营业时间)。