[3] [DFN[[RUBYB[[[時間長]]]@en[duration]]]]とは、[[時間軸]]方向の[[距離]]の大きさをいいます。
曖昧でない場合、単に[[時間]]ともいいます。

[8] 
普通、[[時間軸]]上の特定位置から切り離した時間経過の長さを指しています。

* 時間長、期間、相対時刻

[10] [[時間軸]]上の[[時間位置]]に固定されたものは[[期間]]、[[時間間隔]]といいます。

[14] [[基準点][元期]]が決められ時間経過 ([[時刻]]) を表す役割を持つものは[[相対時刻]]といいます。

[SEE[ 関係性は[[タイムラインモデル]] ]]

* 表現方式

[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]]
- [[TM_Duration]]
- [CODE[:Duration]]
- [CODE[:TemporalUnit]]
- [CODE[:GeneralDurationDescription]]
- [CODE[<time>][<time> (CSS)]]
- [CODE[Accuracy]]
- [[[CODE[timeout(1)]]の[VAR[DURATION]]][timeout(1)]]
- [[TOPS-10の日時形式]]のうち相対日時
- [[通信用語の基礎知識V6フォーマットの日時形式]]

]FIG]


[FIG(short list)[ [9] 複雑なもの
- [CODE[VibratePattern]]

]FIG]

[SEE[ [[日時形式]]、[[時間間隔形式]] ]]


* 時間長 (ISO 8601)

[REFS[
- [2] [[ISO 8601:2004]]

[FIG(quote)[
[FIGCAPTION[
[1] [[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]

]REFS]

[4] [[時間長]]には、[[正確な時間長]] ([[時]]、[[分]]、[[秒]]) と、 
[[nominal duration]] ([[年]]、[[月]]、[[週]]、[[日]])
があります [SRC[>>2 4.4.3.1]]。

* [CODE[:TemporalDuration]]

[15] [[OWL-Time]] の 
[DFN[[CODE[:TemporalDuration]]]]
は、
[[時間間隔]]の特定の開始位置から分離した長さを表すものです。
[SRC[>>16]]

[17] [CODE[:TemporalDuration]] は [CODE[owl:Class]] です。 [SRC[>>16]]

;; [18] [CODE[:TemporalEntity]] や [CODE[:Interval]] の[[子クラス]]ではありません。

[20] [[子クラス]]に
[CODE[:Duration]],
[CODE[:TemporalUnit]],
[CODE[:GeneralDurationDescription]]
があります。

[22] 
[DFN[[CODE[time:Duration]]]]
は、
[CODE[:TemporalDuration]]
の[[子クラス]]であって、
[[十進数]]を [[temporal unit]] で [[scale]] して表現した [[temporal extent]]
の[[時間長]]を表すものです。 [SRC[>>21]]

[FIG(short list)[ [23] [CODE[:Duration]] の[[特性]]
- [CODE[time:numericDuration]]
- [CODE[time:unitType]]
]FIG]

[25] 
[DFN[[CODE[:numericDuration]]]]
の値は 
[CODE[xsd:decimal]] です。 [SRC[>>24]]

[REFS[
- [19] [CITE@en[Time Ontology in OWL]] ([TIME[2019-06-05 22:23:30 +09:00]]) <https://w3c.github.io/sdw/time/#duration>
- [16] [CITE@en[Time Ontology in OWL]] ([TIME[2019-06-05 22:23:30 +09:00]]) <https://w3c.github.io/sdw/time/#time:TemporalDuration>
- [21] [CITE@en[Time Ontology in OWL]] ([TIME[2019-06-05 22:23:30 +09:00]]) <https://w3c.github.io/sdw/time/#time:Duration>
- [24] [CITE@en[Time Ontology in OWL]] ([TIME[2019-06-05 22:23:30 +09:00]]) <https://w3c.github.io/sdw/time/#numeric-value-of-temporal-duration>
]REFS]

* [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]

* メモ

[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]

[27] [[エシュガル語文化圏の日時]]
