seconds

データ型 xs:duration (XML Schema)

[2] XML Schemaxs:duration は、 ISO 8601 をベースに定義された時間を表すデータ型です。

仕様書

値空間

[4] 値は、月数 (months) 秒数 (seconds) で構成されます。 それぞれ整数十進数で、両者の符号は一致していなければなりません>>3

字句空間

[5] 字句空間は、次の正規表現一致する文字列です >>3

-?P( ( ( [0-9]+Y([0-9]+M)?([0-9]+D)?
       | ([0-9]+M)([0-9]+D)?
       | ([0-9]+D)
       )
       (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?
          | ([0-9]+M)([0-9]+(\.[0-9]+)?S)?
          | ([0-9]+(\.[0-9]+)?S)
          )
       )?
    )
  | (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?
       | ([0-9]+M)([0-9]+(\.[0-9]+)?S)?
       | ([0-9]+(\.[0-9]+)?S)
       )
    )
  )

関連

XML Schema暦

[6] HTMLの時間形式と同じく ISO 8601の時間形式をベースにしていますが、 HTML とは違って、

[7] 妥当なvEvent時間文字列もやはり ISO 8601の時間形式ですが、 vEvent とは違って

[8] 派生型として xs:dayTimeDurationxs:yearMonthDuration があります。

歴史

[9] W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes ( ( 版)) http://www.w3.org/TR/xmlschema11-2/#partial-implementation

[10] W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes ( ( 版)) http://www.w3.org/TR/xmlschema11-2/#sec-dt-arith

[11] README.md | master | Chris Lord / gaia-navigator | GitLab ( 版) https://gitlab.com/Cwiiis/gaia-navigator/blob/master/README.md

[12] XPath and XQuery Functions and Operators 3.1 () https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#duration-subtypes

[13] Activity Vocabulary () https://w3c.github.io/activitystreams/vocabulary/#dfn-duration

The value must be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").

[14] データ コントラクト スキーマの参照 () https://msdn.microsoft.com/ja-jp/library/ms733112(v=vs.110).aspx

<!-- xs:duration is restricted to an ordered value space,

to map to System.TimeSpan -->

xs:element name="duration" nillable="true" type="tns:duration"/

xs:simpleType name="duration"

xs:restriction base="xs:duration"

xs:pattern

value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>

xs:minInclusive value="-P10675199DT2H48M5.4775808S"/

xs:maxInclusive value="P10675199DT2H48M5.4775807S"/

</xs:restriction>

</xs:simpleType>

[15] Compose file version 3 reference | Docker Documentation ( ()) https://docs.docker.com/compose/compose-file/#specifying-durations

Some configuration options, such as the interval and timeout sub-options for healthcheck, accept a duration as a string in a format that looks like this:

2.5s

10s

1m30s

2h32m

5h34m56s

The supported units are us, ms, s, m and h.