以ISO 8601:2004表示秒的分数 [英] Representing Fraction of Second with ISO 8601:2004

查看:100
本文介绍了以ISO 8601:2004表示秒的分数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是IS0 8601:2004标准的定义。它表示秒的 小数部分可以用一到六位数字表示。

The following is the definition of IS0 8601:2004 standard. It says that the fraction of second can be represented with one to six digits.

我可以使用所有

6位数字代表秒的秒数吗?

如果我用6位数字代表秒的秒数,以下表示法是正确的吗?

Can I use all the 6 digits for representing the fraction of a second?
Are the following Representation correct, if I use 6 digits for representing fraction of a second?

1ms-001000

10ms-010000

100ms-100000

1ms -- 001000
10ms -- 010000
100ms -- 100000

{扩展时间格式}(32字节)

YYYY-MM-DDThh:mm:ss.sTZD

YYYY =年0000至9999

MM =月01至12

DD =第01到31天
T =特殊分隔符T

hh =小时00到23

mm =分钟00到59

ss =秒00到59

s =一位至六位数字表示秒的一部分

TZD =时区指示符

(TZD表示为'+ hh:mm','-hh:mm'或'Z')

{Extended Time Format} (32 bytes)
YYYY-MM-DDThh:mm:ss.sTZD
YYYY = Year 0000 to 9999
MM = Month 01 to 12
DD = Day 01 to 31
T = special separator T
hh = Hour 00 to 23
mm = Minute 00 to 59
ss = Second 00 to 59
s = one to six digits representing a fraction of a second
TZD = time zone designator
(TZD is denoted by ‘+hh:mm’, ‘-hh:mm’ or‘Z’)

推荐答案

ISO 8601:2004不会在数字中指定位数

ISO 8601:2004 doesn't specify the number of digits in the decimal fraction.

4.2.2.4带小数的表示形式


根据申请,互换方应同意
小数部分的位数。格式应为
[hhmmss,ss],[hhmm,mm]或[hh,hh](分别为小时分钟秒,
小时分钟和小时,视情况而定),且位数应与十进制符号后的必需
。小数部分应至少有一个
位。

The interchange parties, dependent upon the application, shall agree the number of digits in the decimal fraction. The format shall be [hhmmss,ss], [hhmm,mm] or [hh,hh] as appropriate (hour minute second, hour minute, and hour, respectively), with as many digits as necessary following the decimal sign. A decimal fraction shall have at least one digit.

是的,如果您使用6位数字表示

Yes, your representation is correct if you use 6 digits for the decimal fraction.

1ms   -- 001000
10ms  -- 010000
100ms -- 100000
1μs   -- 000001

这篇关于以ISO 8601:2004表示秒的分数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆