/
851.txt
97 lines (72 loc) · 3.14 KB
/
851.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[3] [DFN[[RUBYB[[[時間長]]]@en[duration]]]]とは、[[時間軸]]方向の距離の大きさをいいます。
曖昧でない場合、単に[[時間]]ともいいます。
* 仕様書
[REFS[
- [2] [[ISO 8601:2004]]
]REFS]
* 定義
[FIG[
[FIGCAPTION[
[1] [SRC[[[ISO 8601:2004]] 2.1.6]]
]FIGCAPTION]
> non-negative quantity attributed to a time interval, the value of which is equal to the difference between the
time points of the final instant and the initial instant of the time interval, when the time points are quantitative
marks [SRC[IEC 60050-111]]
]FIG]
* ISO 8601 における時間長
[4] [[時間長]]には、[[正確な時間長]] ([[時]]、[[分]]、[[秒]]) と、
[[nominal duration]] ([[年]]、[[月]]、[[週]]、[[日]])
があります [SRC[>>2 4.4.3.1]]。
* 表現方式
[6] [DFN[時間長形式]]にも色々あります。
[FIG(short list)[
- [[ISO 8601の時間長形式]]
- [[HTMLの時間形式]] (3種類)
- [CODE(XML)[[[xs:duration]]]]
- [CODE(XML)[[[xs:yearMonthDuration]]]]
- [CODE(XML)[[[xs:dayTimeDuration]]]]
- [[RFC 3339の時間形式]]
- [[SQLの時間形式]]
-- [CODE[reltime]]
-- [CODE[timespan]]
- [CODE[DOMTimeStamp]]
- [CODE[DOMHighResTimeStamp]]
- [[[CODE[Duration]] (Go)]]
- [CODE[http://schema.org/Duration]]
- [[Webの日時形式]]の数値表現各種
- [CODE[time-interval]]
- [[[CODE[duration]] (IODEF)]]
- [CODE(ABNF)@en[delta-seconds]]
- [[Time interavl][ISO/IEC 11404]]
]FIG]
[FIG(short list)[ [9] 複雑なもの
- [CODE[VibratePattern]]
]FIG]
;; [8] [[日時形式]]、[[時間間隔形式]]も参照。
* [DFN[Duration (Go)]]
[FIG(quote)[
[FIGCAPTION[
[5] [CITE[time - The Go Programming Language]]
([TIME[2017-03-10 18:04:49 +09:00]])
<https://golang.org/pkg/time/#Duration>
]FIGCAPTION]
> A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
]FIG]
* 関連
[10] [[相対時刻]]も参照。
* メモ
[7] [CITE@ja[「”」や「’」を使ったタイム表記の例を教えてください。例えば、1時間23分45秒... - Yahoo!知恵袋]] ([TIME[2017-01-14 20:41:23 +09:00]]) <http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q136411458>
[11] [CITE[Javaでの時間(絶対時刻、相対時刻=時間)をどう表現するかを考える - torutkの日記]]
( ([TIME[2017-05-08 02:23:21 +09:00]]))
<https://d.hatena.ne.jp/torutk/20070929/p1>
[12] [CITE@en[Time Ontology in OWL]]
([TIME[2017-10-16 14:39:32 +09:00]])
<https://w3c.github.io/sdw/time/#x3-4-duration>
[FIG(quote)[
[FIGCAPTION[
[13] [CITE@en[Language Guide (proto3) | Protocol Buffers | Google Developers]]
([TIME[2018-04-07 03:12:07 +09:00]])
<https://developers.google.com/protocol-buffers/docs/proto3>
]FIGCAPTION]
> Duration string "1.000340012s", "1s" Generated output always contains 0, 3, 6, or 9 fractional digits, depending on required precision, followed by the suffix "s". Accepted are any fractional digits (also none) as long as they fit into nano-seconds precision and the suffix "s" is required.
]FIG]