diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index d5e719f..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Auto-generated by Cimas: Do not edit it manually! -# See https://github.com/metanorma/cimas -name: docker - -on: - push: - branches: [ master ] - pull_request: - paths-ignore: - - .github/workflows/macos.yml - - .github/workflows/ubuntu.yml - - .github/workflows/windows.yml - -jobs: - test-docker: - runs-on: ubuntu-latest - container: docker://metanorma/mn - steps: - - uses: actions/checkout@master - - name: Checkout submodules - shell: bash - run: | - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - - name: Setup fonts - run: | - # We need to do this to install mscorefonts - apt-add-repository -y contrib - apt-get update - echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections - apt-get install -y ttf-mscorefonts-installer - curl -Ls https://raw.githubusercontent.com/metanorma/vista-fonts-installer/master/vista-fonts-installer.sh | bash - - uses: actions/setup-go@v2-beta - with: - go-version: '^1.13.1' - - name: Install yq - run: | - GO111MODULE=on go get github.com/mikefarah/yq/v3 - ln -s $GOPATH/bin/yq /usr/local/bin/yq - - name: Instal gems from local Gemfile - run: | - curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/gemfile-to-bundle-add.sh | bash - - name: Build document in the Metanorma container - env: - LC_ALL: C.UTF-8 - LANG: C.UTF-8 - LANGUAGE: C.UTF-8 - run: | - make clean all publish - - uses: actions/upload-artifact@master - with: - name: published - path: published - - deploy-gh-pages: - if: github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - needs: test-docker - steps: - - uses: actions/checkout@master - - uses: actions/download-artifact@v1 - with: - name: published - - name: Deploy to GH Pages - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.GH_DEPLOY_KEY }} - publish_dir: ./published - force_orphan: true - user_name: ${{ github.actor }} - user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }} - commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}" - - uses: kolpav/purge-artifacts-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - expire-in: 0 diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 0000000..8a94620 --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,21 @@ +name: generate + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + site: + uses: actions-mn/.github/.github/workflows/metanorma-generate.yml@v1 + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..34f525e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release + +on: + push: + branches: [main] + paths: ['sources/**', 'metanorma.yml', 'metanorma.release.yml'] + workflow_dispatch: + +permissions: + contents: write + +jobs: + release: + uses: actions-mn/.github/.github/workflows/metanorma-release.yml@v1 + with: + default-visibility: private + secrets: inherit diff --git a/csd-datetime-explicit.doc b/csd-datetime-explicit.doc new file mode 100644 index 0000000..9ffd1d8 --- /dev/null +++ b/csd-datetime-explicit.doc @@ -0,0 +1,4364 @@ +MIME-Version: 1.0 +Content-Type: multipart/related; boundary="----=_NextPart_9777c15e.6c32.4720" + +------=_NextPart_9777c15e.6c32.4720 +Content-Location: file:///C:/Doc/csd-datetime-explicit.htm +Content-Type: text/html; charset="utf-8" + + + + + + + + + + + +

+ + CC/FDS 18011:2018 + + + +

+ + +

+ +

+ CalConnect  + + VCARD, CALENDAR + +

+ +

+ Date and time — Explicit representation + +
+ +

+ + +

+ Editors: +

+ + +

+ Authors: +

+ + +

+ +

 

+ +

+ +
+ +

Standard

+ + +
+ +

+ +

 

+ +

+ +
+ + + +
+ +

+ The Calendaring and Scheduling Consortium, Inc.  + + 2018 + +

+ + + + + +

 

+
+
+
+ + + + +

+ Contents +

+ +

 TOC + \o "1-2" \h \z \u + +Foreword +. + + + PAGEREF _Toc192001656 \h + 1 +

+ +

+ + +Introduction +. + + + PAGEREF _Toc203712260 \h + 1 + + +

+ +

+ + +1. Scope +. + + + PAGEREF _Toc317512012 \h + 1 + + +

+ +

+ + +2. Normative references +. + + + PAGEREF _Toc409726553 \h + 1 + + +

+ +

+ + +3. Terms, definitions, symbols and abbreviated terms +. + + + PAGEREF _Toc38280296 \h + 1 + + +

+ +

+ + +3.1. Terms and definitions +. + + + PAGEREF _Toc926923905 \h + 1 + + +

+ +

+ + +3.2. Symbols and abbreviated terms +. + + + PAGEREF _Toc996059683 \h + 1 + + +

+ +

+ + +4. Time scale components and units +. + + + PAGEREF _Toc947724523 \h + 1 + + +

+ +

+ + +4.1. General +. + + + PAGEREF _Toc632553858 \h + 1 + + +

+ +

+ + +4.2. Order of time scale units +. + + + PAGEREF _Toc121609428 \h + 1 + + +

+ +

+ + +4.3. Explicit forms +. + + + PAGEREF _Toc335435476 \h + 1 + + +

+ +

+ + +4.4. Negative values +. + + + PAGEREF _Toc940319595 \h + 1 + + +

+ +

+ + +5. Grouped time scale units +. + + + PAGEREF _Toc991370367 \h + 1 + + +

+ +

+ + +5.1. General +. + + + PAGEREF _Toc680163836 \h + 1 + + +

+ +

+ + +5.2. Unit definition +. + + + PAGEREF _Toc967459486 \h + 1 + + +

+ +

+ + +5.3. Unit value +. + + + PAGEREF _Toc133838751 \h + 1 + + +

+ +

+ + +5.4. Application within representations +. + + + PAGEREF _Toc721471616 \h + 1 + + +

+ +

+ + +6. Explicit representations +. + + + PAGEREF _Toc83288945 \h + 1 + + +

+ +

+ + +6.1. General +. + + + PAGEREF _Toc791296955 \h + 1 + + +

+ +

+ + +6.2. Date +. + + + PAGEREF _Toc966628721 \h + 1 + + +

+ +

+ + +6.3. Time of day +. + + + PAGEREF _Toc516185227 \h + 1 + + +

+ +

+ + +6.4. Time shift +. + + + PAGEREF _Toc174643347 \h + 1 + + +

+ +

+ + +6.5. Date with shift +. + + + PAGEREF _Toc984872168 \h + 1 + + +

+ +

+ + +6.6. Time of day with time shift +. + + + PAGEREF _Toc536069822 \h + 1 + + +

+ +

+ + +6.7. Date and time of day +. + + + PAGEREF _Toc585131516 \h + 1 + + +

+ +

+ + +6.8. Decade +. + + + PAGEREF _Toc592456413 \h + 1 + + +

+ +

+ + +6.9. Century +. + + + PAGEREF _Toc360680270 \h + 1 + + +

+ +

+ + +6.10. Omission of zero valued components +. + + + PAGEREF _Toc277807164 \h + 1 + + +

+ +

+ + +6.11. Indication of precision +. + + + PAGEREF _Toc640535768 \h + 1 + + +

+ +

+ + +6.12. Decimal fractions for time +. + + + PAGEREF _Toc363897556 \h + 1 + + +

+ +

+ + +6.13. Representations other than complete +. + + + PAGEREF _Toc410764274 \h + 1 + + +

+ +

+ + +6.14. Time interval +. + + + PAGEREF _Toc677984641 \h + 1 + + +

+ +

+ + +7. Explicit duration +. + + + PAGEREF _Toc747566334 \h + 1 + + +

+ +

+ + +7.1. General +. + + + PAGEREF _Toc407072300 \h + 1 + + +

+ +

+ + +7.2. Durational units +. + + + PAGEREF _Toc15702671 \h + 1 + + +

+ +

+ + +7.3. Representations +. + + + PAGEREF _Toc912550784 \h + 1 + + +

+ +

+ + +7.4. Negative duration +. + + + PAGEREF _Toc796296340 \h + 1 + + +

+ +

+ + +7.5. Fractional duration +. + + + PAGEREF _Toc426434666 \h + 1 + + +

+ +

+ + +7.6. Exact duration +. + + + PAGEREF _Toc974142964 \h + 1 + + +

+ +

+ + +8. Evaluation of date and time with duration +. + + + PAGEREF _Toc615613865 \h + 1 + + +

+ +

+ + +8.1. General +. + + + PAGEREF _Toc393222683 \h + 1 + + +

+ +

+ + +8.2. Prerequisite mechanisms +. + + + PAGEREF _Toc275333076 \h + 1 + + +

+ +

+ + +8.3. Simple duration +. + + + PAGEREF _Toc751847277 \h + 1 + + +

+ +

+ + +8.4. Composite duration +. + + + PAGEREF _Toc457223631 \h + 1 + + +

+ +

+ + +8.5. Precedence duration +. + + + PAGEREF _Toc619468965 \h + 1 + + +

+ +

+ + +8.6. Involving fractional duration +. + + + PAGEREF _Toc807973529 \h + 1 + + +

+ +

+ + +8.7. Involving speculative duration +. + + + PAGEREF _Toc995105331 \h + 1 + + +

+ +

+ + +Bibliography +. + + + PAGEREF _Toc712299694 \h + 1 + + +

+ +

+ + + + +

 

+ +

+ + +
+
+

Foreword

+

The Calendaring and Scheduling Consortium ("CalConnect") is global non-profit +organization with the aim to facilitate interoperability of technologies across +user-centric systems and applications.

+

CalConnect works closely with liaison partners including international +organizations such as ISO, OASIS and M3AAWG.

+

The procedures used to develop this document and those intended for its further +maintenance are described in the CalConnect Directives.

+

In particular the different approval criteria needed for the different types of +CalConnect documents should be noted. This document was drafted in accordance with the +editorial rules of the CalConnect Directives.

+

Attention is drawn to the possibility that some of the elements of this +document may be the subject of patent rights. CalConnect shall not be held responsible +for identifying any or all such patent rights. Details of any patent rights +identified during the development of the document will be in the Introduction +and/or on the CalConnect list of patent declarations received (see +www.calconnect.com/patents).

+

Any trade name used in this document is information given for the convenience +of users and does not constitute an endorsement.

+

This document was prepared by Technical Committee VCARD, CALENDAR.

+
+
+
+

Introduction

+

ISO 8601:2004 has been the international standard for date and time representations +and is applied widely, including in the RFC5545 and RFC6350 standards.

+

However, the representations provided in ISO 8601:2004 require +fixed-length digits for time scale components, such as the +4-digit year, does not accept negative values, and does not +allow omission of a time scale component that has a zero value.

+

This document extends the "duration" representation +defined in ISO 8601:2004 to fulfill the need of a flexible-length +representation, called the "explicit form".

+
+

 

+
+
+
+

Date and time — Explicit representation

+
+

1.  Scope

+

The purpose of this document is to provide:

+ +

+ a standard, declarative representation of date and time and time +scale components called the "explicit form"; +

+

+ a grouped time scale unit mechanism for grouping of date and time; +and +

+

+ new duration representations and mechanics for the calculation of +date time formulas involving duration. +

+ +

This document only supports date elements from the Gregorian calendar and +times from the 24-hour clock.

+

Date and time format representations described in this document +utilizes numbers, alphabets and symbols defined in ISO/IEC 646. +These representations are meant to be both human recognizable and +machine readable. Character encoding of the representations is +not covered in this document.

+
+
+

2.  Normative references

+

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

+

ISO 8601-1:--, Date and time — Representation for information interchange — Part 1: Basic rules

+
+

3.  Terms, definitions, symbols and abbreviated terms

For the purposes of this document, the terms and definitions + given in ISO 8601-1:-- and the following apply.

+

3.1. Terms and definitions

3.1.1 

explicit form

+ +

date and time representation that uses designator symbols to delimit time scale components

+ +

3.1.2 

designator symbols

+ +

characters used to denote units of a time scale component

+ +

3.1.3 

date time formula

+ +

expression that specifies modification of a date and time expression (ISO 8601-1:--, Clause 3.1.3.1) with a duration (ISO 8601-1:--, Clause 3.1.1.8)

+ +

3.1.4 

durational unit

+ +

time scale component (ISO 8601-1:--, Clause 3.1.3.3) that compose the duration (ISO 8601-1:--, Clause 3.1.1.8) date and time representation (ISO 8601-1:--, Clause 3.1.3.2)

+ +

3.1.5 

grouped time scale unit

+ +

time scale unit (ISO 8601-1:--, Clause 3.1.1.7) composed of a duration (ISO 8601-1:--, Clause 3.1.1.8) expressed by one or more durational units (Clause 3.1.4)

+

3.2. Symbols and abbreviated terms

3.2.1 

General

+ +

Representations specified in this document make use of symbols given in ISO 8601-1:-- and the following.

+ +

3.2.2 

Time scale component symbols

+ +

c(feat)

+

the left side of representation statement where "c" is a time scale component (e.g. "year") and "feat" is a feature, for example, "m" for a time scale component that accepts negative values

+

yearE

+

time scale component calendar year in explicit form

+

monthE

+

time scale component calendar month in explicit form

+

weekE

+

time scale component calendar week of year in explicit form

+

dayE

+

time scale component calendar day of month in explicit form

+

daykE

+

time scale component calendar day of week in explicit form

+

dayoE

+

time scale component calendar day of year in explicit form

+

hourE

+

time scale component clock hour in explicit form

+

minE

+

time scale component clock minute in explicit form

+

secE

+

time scale component clock second in explicit form

+

decE

+

time scale component decade in explicit form

+

centE

+

time scale component century in explicit form

+
+ +

3.2.3 

Composite component symbols

+ +

dateE

+

the composite time scale components for the complete representation of a date as determined in Clause 6.2.1

+

timeE

+

the composite time scale components for the complete representation of a time of day as determined in Clause 6.3.1

+

shiftE

+

the composite time scale component for time shift in basic form with hours and minutes, as determined in Clause 6.4

+

durationE

+

the composite time scale units for the representation of a duration as determined in ISO 8601:2004

+
+ +

3.2.4 

Symbols used in place of digits or signs

These symbols are used to represent characters in the date and time representations. They are used in representations only, and are replaced by one or more characters, as described, in expressions:

+

!

+

indicates that the token following this symbol is optional (may be omitted)

+

n

+

a positive integer or value, may be left absent to signify an unbounded value

+

i

+

a positive integer

+

negi

+

a positive or negative integer; equivalent to [!]["-"][i]

+
+

3.2.5 

Designator symbols

These symbols are used to represent designators in the date and time expressions:

+

"-"

+

a minus sign represented by the character "`-"` to indicate a negative value

+

"K"

+

the calendar day of week designator, represented by the character "K", preceding a data element which represents the ordinal number of a calendar day within a calendar week

+

"J"

+

the decade designator, represented by the character "J", preceding a data element which represents the number of decades

+

"Y"

+

the year designator, represented by the character "Y", preceding a data element which represents the number of years

+

"M"

+

the month or minute designator, represented by the character "M", preceding a data element which represents the number of months or minutes

+

"W"

+

the week designator, represented by the character "W", preceding a data element which represents the ordinal number of a calendar week within the calendar year

+

"O"

+

the calendar day of year designator, represented by the character "O", preceding a data element which represents the ordinal number of a calendar day within a calendar year

+

"D"

+

the day of month designator, represented by the character "D", preceding a data element which represents the number of days in a month

+

"H"

+

the hour designator, represented by the character "H", preceding a data element which represents the number of hours

+

"S"

+

the second designator, represented by the character "S", preceding a data element which represents the number of seconds

+

"T"

+

the time designator, represented by character "T", indicates:

+ +

+ the start of the representation of local time of day to designate local time of day expressions as such, +

+

+ the start of the representation of the time of day in date and time of day expressions, +

+

+ the start of the representation of the number of hours, minutes or seconds in expressions of duration +

+ +

"P"

+

the duration designator, represented by the character "P", preceding the component which represents the duration

+

"B"

+

the suffix designator to represent years before year one, represented by the character "B", placed after the time scale components of calendar year, decade and century.

+

"Z"

+

the UTC designator, represented by the character "Z", added to the end of a time representation to indicate that a time of day is represented as UTC of day.

+

"G"

+

the grouped time scale unit prefix designator, represented by the character "G", indicates a grouping calculation applies to the subsequent time scale components until encountering the corresponding suffix designator.

+

"U"

+

the grouped time scale unit suffix designator, represented by the character "U", indicates a grouping calculation applies to the preceding time scale components from the corresponding prefix designator.

+

"x"

+

the representation of any character "x" as according to the textual representation of "x" in the ISO/IEC 646 repertoire

+
+ + +

Note 1 to entry: Although "M" can be used to designate months or for minutes, its meaning is unambiguous in expressions because the time portion shall always be preceded by the time designator "T".

Note 2 to entry: The designator symbol "J" is assigned from its ordinal position +being the tenth letter of the English alphabet.

Note 3 to entry: The "G" and "U" designator symbols are used to demarcate the +"grouped time scale unit" time scale components as they form the +initial letters of the words "group" and "unit".

+

3.2.6 

Separator symbols

In date and time expressions and date and time representations, the following characters are used as separators.

+

"/" (solidus)

+

the "/" solidus character separates start and end times in the representation of a time interval, as well as the symbol 'R' from the remainder of a recurring time interval representation. A solidus may be replaced with a double hyphen ["--"] by mutual agreement of the communicating partners.

+

"." (period) and "," (comma)

+

the "." period and "," comma characters are decimal signs used to separate the integer part from the decimal fraction of a number.

+
+
+

4.  Time scale components and units

+

4.1. General

+ +

Additional properties and the explicit forms of time scale units are +represented in this clause.

+
+

4.2. Order of time scale units

This document refers to an "order" amongst time scale units, which is +defined by the duration of a time scale unit relative to other time +scale units. For example, since a single calendar month has a duration +always greater than a single unit of calendar day, the former is +considered of a higher order time scale unit than calendar day, and +therefore the latter is also considered of a lower order time scale +unit than the former.

+

The relative order of commonly used time scale units is specified +below, with the higher listed entry considered a higher order time +scale unit than a lower listed entry:

+ +

+ calendar century +

+

+ calendar decade +

+

+ calendar year +

+

+ calendar month +

+

+ calendar week +

+

+ calendar day +

+

+ clock hour +

+

+ clock minute +

+

+ clock second +

+ +

NOTE  a higher order time scale does not necessarily mean its duration +can be expressed as an integer multiple of a lower order time scale, +for example, in the case of calendar month (28, 29, 30 or 31 days) +and calendar week (7 days).

+

4.3. Explicit forms

4.3.1. Value prefixing

Prefixing of the value with one or more "`0`"s (the number zero) to the +integer [i] is allowed in the explicit forms of time scale components.

+
EXAMPLE +

'1M', '01M', and '0001M' all describe the calendar month January.

+
+

4.3.2. Calendar year and years duration

The calendar year and years duration is represented as follows:

+

[i]["Y"]

+
EXAMPLE 1 +

'12Y', duration, twelve years

+

 

+
EXAMPLE 2 +

'12Y', date, year 12.

+
+

4.3.3. Calendar month and months duration

The calendar month and months duration is represented as follows:

+

[i]["M"]

+
EXAMPLE 1 +

'6M', duration, 6 months.

+

 

+
EXAMPLE 2 +

'8M', date, the month of August.

+
+

4.3.4. Calendar week of year and weeks duration

The calendar week of year number and weeks duration is represented as +follows:

+

[i]["W"]

+
EXAMPLE 1 +

'10W', duration, ten weeks.

+

 

+
EXAMPLE 2 +

'22W', date, the twenty-second calendar week of a calendar year.

+
+

4.3.5. Calendar day of month and days duration

The calendar day of month and days duration is represented as follows:

+

[i]["D"]

+
EXAMPLE 1 +

'130D', duration, 130 days.

+

 

+
EXAMPLE 2 +

'25D', date, the twenty-fifth (25) calendar day of a calendar month.

+
+

4.3.6. Calendar day of week

The calendar day of week is represented as the following time scale component:

+

[i]["K"]

+

Where,

+ +

+ [i] represents the ordinal day number in the calendar week; +valid values of [i] are the integers 1 to 7, representing Monday to Sunday, +in accordance with "The week calendar" specified in ISO 8601-1:--, Clause 4.2.2. +

+ +
EXAMPLE 1 +

'1K', calendar day of week Monday

+

 

+
EXAMPLE 2 +

'3K', calendar day of week Wednesday

+

 

+
EXAMPLE 3 +

'7K', calendar day of week Sunday

+
+

4.3.7. Calendar day of year

The calendar day of year is represented as the following time scale component:

+

[i]["O"]

+
EXAMPLE +

'351O', ordinal day 351 of the calendar year

+
+

4.3.8. Clock hour and hours duration

Clock hour and hours duration is represented as follows:

+

[i]["H"]

+
EXAMPLE 1 +

'36H', duration, thirty-six hours.

+

 

+
EXAMPLE 2 +

'6H', time, the sixth clock hour.

+
+

4.3.9. Clock minute and minutes duration

Clock minute and minutes duration is represented as follows:

+

[i]["M"]

+
EXAMPLE 1 +

'72M', duration, 72 minutes.

+

 

+
EXAMPLE 2 +

'56M', time, the fifty-sixth clock minute.

+
+

4.3.10. Clock second and seconds duration

Clock second and seconds duration is represented as follows:

+

[i]["S"]

+
EXAMPLE 1 +

'300S', duration, 300 seconds

+

 

+
EXAMPLE 2 +

'28S', duration, the twenty-eighth clock second.

+
+

4.3.11. Decade

The decade is represented as the following time scale component:

+

[i]["J"]

+
EXAMPLE 1 +

'196J' in explicit form represents the decade of the 1960s, spanning the calendar years 1960 to 1969.

+

 

+
EXAMPLE 2 +

'0J' in explicit form represents the decade spanning calendar years 0 to 9.

+
+

4.3.12. Century

The century is represented as the following time scale component:

+

[i]["C"]

+
EXAMPLE 1 +

'16C', in explicit form represents the century of 1600s, spanning the calendar years 1600 to 1699.

+

 

+
EXAMPLE 2 +

'0C', in explicit form represents the century spanning the calendar years 00 to 99.

+
+

4.4. Negative values

4.4.1. General

Certain time scale components are allowed to accept a negative integer as their value. The following representation is used for value that accepts a positive or negative integer.

+

negi = [!]["`-`"][i]

+

In order to convert a time scale component to accept negative values, the following representation is used, where c is a time scale component unit. If the time scale component accepts an integer value of '0', the value of the expression '-0' (negative zero) is considered equivalent to that of '0'.

+

c(m) = [negi][c]

+

Where,

+ +

+ [c] is the time scale component representation that accepts only positive [i]; +

+

+ [m] is a feature label indicating that the time scale component [c] accepts negative values. +

+ +

This representation only applies to time scale components that describe a time scale unit. Specifically, it does not apply to durations, time intervals, and repeating time intervals.

+
EXAMPLE +

If "c" is the time scale component yearE in explicit form (see Part 1 4.3.2 b)), c(m) means "calendar year accepting a negative value". The explicit year representation [i]["Y"] becomes [negi]["Y"] when [i] is replaced with [negi], and expands to [!]["-"]][i]["Y"], which accepts the representations [i]["Y`"] or ["-"]"Y"]. In this expression, the value of [i] or ["-"`][i] represents an integer whose value identifies a calendar year.

+
+

4.4.2. Calendar year

When a negative calendar year represents a date, the negative value is +to represent the number of years prior to year zero (0).

+

The representation for calendar year that accepts a negative value is as follows.

+

year(m)

+
EXAMPLE 1 +

'-12Y' in date represents the the calendar year -12.

+

 

+
EXAMPLE 2 +

'-1Y' in date represents the year immediately preceding year 0.

+
+

NOTE  Year zero is expressed as '0Y' in explicit form.

+

4.4.3. Calendar week of year

When a negative calendar week of year represents a date, the negative +value is to represent the number of weeks counting in reverse from the +end of the calendar year, where the last week of the year is +represented by the integer value '-1'.

+

The representation for calendar week of year that accepts a negative value is as follows.

+

week(m)

+
EXAMPLE 1 +

'-10W' in date represents the tenth last week of the year.

+

 

+
EXAMPLE 2 +

'-3W' in date represents the third last week of the year.

+
+

4.4.4. Calendar day of month

When a negative calendar day of month represents a date, the negative +value is to represent the number of days counting in reverse from the +end of the calendar month, where the last day of the month is +represented by the integer value '-1'.

+

The representation for calendar day of month that accepts a negative value is as follows.

+

day(m)

+
EXAMPLE 1 +

'-1D' in date represents the last day of the month.

+

 

+
EXAMPLE 2 +

'-5D' in date represents the fifth last day of the month.

+
+

4.4.5. Calendar day of year

When a negative calendar day of year represents a date, the negative value is to represent the number of days counting in reverse from the end of the calendar year, where the last day of the year is represented by the integer value '-1'.

+

The representation for calendar day of year that accepts a negative value is as follows.

+

dayo(m)

+
EXAMPLE 1 +

'-7O' in date represents the seventh last day of the calendar year, which is always December 25th.

+

 

+
EXAMPLE 2 +

'-306O' in date represents February 29th for a leap year, February 28th otherwise.

+
+

4.4.6. Duration

A duration in the reverse direction, called a "negative duration" in +this document, can be expressed using the following representation +based on the duration representation specified in +ISO 8601-2:--, Clause 5.4.2. +In this case, all time scale component within the duration +representation must be positive.

+

duration(m) = [!]["`-"`][positive-duration]

+

Where,

+ +

+ [positive-duration] is the [duration] representation that contains only time scale components that have positive [i]. +

+ +
EXAMPLE 1 +

'-P100D' in date represents the duration of 100 days in the reverse direction.

+

 

+
EXAMPLE 2 +

'-P1Y3D' in date represents the duration of one years and three days in the reverse direction.

+

 

+
EXAMPLE 3 +

'-P20Y3M' describes a negative duration of twenty years and three months ago.

+
+

4.4.7. Calendar year before year one

A suffix addition to time scale components for calendar year, decade and century +allows representation of calendar years before year one (1).

+

The representation is given as follows.

+

[c]["B"]

+

Where,

+ +

+ [c] is one of [yearE], [decE], [centE]. +

+ +
EXAMPLE 1 +

'1YB' the first year before year one, equivalent to the effect of '0Y'.

+

 

+
EXAMPLE 2 +

'12YB' the twelfth year before year one, equivalent to the effect of '-11Y'.

+

 

+
EXAMPLE 3 +

'12JB' the twelfth decade before year one, equivalent to the effect of time interval +'-119/-110'.

+

 

+
EXAMPLE 4 +

'12CB' the twelfth century before year one, equivalent to the effect of time interval +'-1190/-1100'.

+
+
+
+

5.  Grouped time scale units

+

5.1. General

+ +

A time scale unit can be grouped into a larger composite unit that +can each be specifically referred to using representations provided +in this clause.

+
+

5.2. Unit definition

A grouped time scale unit ("grouped unit") defines a time scale unit +that is a composite of smaller time scale units. +Its representation is provided as follows +and is denoted as [groupUnit] in this document.

+

["G"][durationUnits]["U"]

+

Where,

+ +

+ ["G"] is the grouping prefix designator; +

+

+ ["U"] is the grouping suffix designator; +

+

+ [durationUnits], one or more time scale components for +expressing positive duration as specified in +duration-general. +

+ +

The definition of a grouped unit is a continuous one, such that there is no gap between two adjacent grouped units.

+
EXAMPLE 1 +

'G10DU', every unit of the grouped unit is of ten days duration.

+

 

+
EXAMPLE 2 +

'GT30MU', every unit of the grouped unit is of thirty minutes duration.

+

 

+
EXAMPLE 3 +

'G2DT6HU', every unit of the grouped unit is of two days and six hours duration.

+
+

5.3. Unit value

The value of a grouped time scale unit is given with +the following representation. +This representation is denoted as [group] in this document.

+

group = [i][groupUnit]

+

Where,

+ +

+ [i] indicates the coefficient value of the grouped time scale unit; +

+

+ [groupUnit] denotes an expression for a grouped time scale unit +(grouping-unit). +

+ +
EXAMPLE 1 +

'5G10DU', the fifth unit of ten-day groups.

+

 

+
EXAMPLE 2 +

'20GT30MU', the twentieth unit of thirty-minute groups.

+

 

+
EXAMPLE 3 +

'2G2DT6HU', the second unit of two-day groups.

+

 

+
EXAMPLE 4 +

'2018-02-GP14D2I' and '2018Y02MGP14D2ID' are complete date representations that indicates "the second fortnight of February 2018", as specified by the rule "group every 14 days, second group".

+

 

+
EXAMPLE 5 +

'2018-03-GP10D3I' and '2018Y03MGP10D3ID' are complete date representations that indicates "the third 10-day block of March in 2018", as specified by the rule "group every 10 days, third group". A 10-day block is a time grouping commonly used in East Asia.

+

 

+
EXAMPLE 6 +

’16:GPT15M1I:00’ and 'T16HGPT15M1I0S' are complete time representations that indicates "the first quarter-hour of 16:00", as specified by the rule "group every 15 minutes, first group".

+

 

+
EXAMPLE 7 +

'2018-GP6M1I' and '2018YGP6M1IM' are date expressions (implied and explicit formats, respectively) of monthly precision that indicates "the first half of 2018", as specified by the rule "group every 6 months, first group", and therefore the grouping is specified in the [month] field. The resulting time interval is equivalent to the time interval expression '2018-01-01/2018-06-30'.

+
+

5.4. Application within representations

5.4.1. General

Grouped time scale units can be applied to date and time representations as +replacements for any time scale unit components as +long as the resulting expression is a valid one.

+
EXAMPLE 1 +

2018Y3G60DU6D is a valid date expression that refers to the date +year 2018, ordinal day of year 186 (which is July 5th).

+

 

+
EXAMPLE 2 +

2018Y9M2DT2GT8HU0H30M is a valid date and time expression that +refers to the date year 2018, September 2nd, 16:30.

+
+

5.4.2. Use of grouped units

Date and time representations can incorporate the grouped +time scale units by applying rules from Clause 5.2 +and Clause 5.3 to a date and time representation +described by this document and ISO 8601-1:--, by +replacing a time scale unit component in the representations +with [group].

+

The following representation is used for date and time +representations (complete representation, reduced precision) +that incorporate grouped time scale units. This +representation is denoted as [groupDateTime] in this document.

+

[higher-order-units][group][lower-units]

+

Where,

+ +

+ [higher-order-units] contains time scale units (and their +values) that are of higher order compared to the highest order time +scale unit within the group unit; +

+

+ [lower-order-units] is optional, it contains time scale +units (and their values) that are of equal or lower order compared to +the lowest order time scale unit within the group unit. +

+ +
EXAMPLE 1 +

[monthE][group][yearE] is an invalid date and time representation +as [monthE] has a lower order than that of [yearE].

+
+

When [lower-order-units] is omitted, the expression refers +to a unit of the grouped time scale unit.

+
EXAMPLE 2 +

[centE][group] is a valid date and time representation, +expressing in units of the grouped time scale unit.

+

 

+
EXAMPLE 3 +

'2018Y1G60DU' represents the first 60-day group of the +year 2018.

+

 

+
EXAMPLE 4 +

'2018Y2M2G14DU' refers to the second 14-day group +in February of year 2018, which is in effect referring to +"the second fortnight of February 2018".

+

 

+
EXAMPLE 5 +

'2018Y3M3G10DU' refers to the third 10-day block of March +in 2018. A 10-day block is a time grouping commonly used +in East Asia.

+

 

+
EXAMPLE 6 +

'T16H1GT15MU' refers to the first quarter-hour of 16:00.

+
+

When [lower-order-units] is present, the expression refers +to a date and time using the lowest time scale unit in the +[lower-order-units] expression.

+

Time scale components placed to the right of a grouped +time scale unit behaves identically to those after a typical +time scale component, such that the component to the right +refers to an instance or time interval "within" the +component at the left.

+
EXAMPLE 7 +

[yearE][group][dayE] is a valid date and time representation, +expressing in the calendar day time scale unit. The [dayE] +points to a calendar day within the expression [yearE][group].

+

 

+
EXAMPLE 8 +

[decE][group][timeE] is a valid date and time representation, +expressing in the lowest order time scale units specified in +[timeE], which is the clock second time scale unit. The [timeE] +points to a clock time within the expression [decE][group].

+

 

+
EXAMPLE 9 +

'2018Y3G60DU6D' represents the sixth day of the third +60-day group of the year 2018.

+

 

+
EXAMPLE 10 +

'2018Y20GT12HU3H' represents the third hour within the +twentieth 12-hour group of the year 2018.

+
+

5.4.3. Adherence to grouped unit boundaries

Time scale unit values provided in [lower-order-units] must +not fall outside of the value bounds set by the group time scale unit +(the [group] expression).

+
EXAMPLE 1 +

'2018Y1G2MU30D' refers to the thirtieth day of the first +two-month group in year 2018. Since the first two-month group +of 2018 contains 59 days, the subsequent expression 30D falls +within the same grouped time scale unit.

+

 

+
EXAMPLE 2 +

'2018Y1G2MU60D' refers to the sixtieth day of the first +two-month group in year 2018. It is an invalid expression +as the first two-month group of 2018 only contains 59 days, +the expression 60D falls outside of the same grouped +time scale unit.

+
+

5.4.4. Representation with time shift

A representation using grouped time scale units can be represented +with a time shift as:

+

[groupDateTime][shiftE]

+
EXAMPLE 1 +

'2018Y1G60DUZ-5H', the first 60-day group of the year 2018, +five hours behind UTC.

+

 

+
EXAMPLE 2 +

'2018Y3G60DU6DZ8H' represents the sixth day of the third +60-day group of the year 2018, eight hours ahead of UTC.

+
+

5.4.5. Conversion to basic time scale units

5.4.5.1. General

When an expression referring to a grouped time scale +unit has to be converted to use basic time scale units +(time scale units that are defined in Clause 4), +it can be converted into a time interval.

+
EXAMPLE +

'2018Y1G6MU' refers to the first 6-month group of year 2018. +The resulting time interval is equivalent to that of the time interval +expression '2018Y1M/2018Y6M'.

+
+

5.4.5.2. Truncation of partial units

When the duration of a grouped time scale unit does not cleanly +divide the original time scale component, the duration of +the last unit of the grouped time scale is only partially +located within the boundaries specified by the original time scale component.

+

In this case, the particular grouped time scale unit refers only +to the duration that is within bounds of the original time +scale component. The remaining duration that are out +of bounds shall be truncated.

+
EXAMPLE +

2018Y9M4G8DU refers to the +"fourth 8-day grouping of September of year 2018", +but the fourth grouped unit only has 6 days within September +and 2 days in October. According to the truncation rule, only +the first 6 days belong to this grouped unit, and the resulting +time interval is 2018-09-25/2018-09-30.

+
+

5.4.5.3. Spanning grouped unit boundaries

In order to express a time interval covered by the grouped +unit without regard to the boundaries of the original time component, +the same expression can be provided using time interval representation.

+
EXAMPLE +

2018Y9M4G8DU, "fourth 8-day grouping of September of year 2018", +the start date of the fourth grouped unit can be found as 2018Y9M25D. +Therefore, the expression of 2018Y9M25D/P8D provides the full 8-day +duration of the unit, in the interval 2018Y9M25D/2018Y10M2.

+
+
+
+

6.  Explicit representations

+

6.1. General

+ +

This section provides date and time representations using explicit form.

+
+

6.2. Date

6.2.1. General

+ +

The representations provided in this clause are collectively denoted as [dateE].

+
+

6.2.2. Calendar date

The complete representation of a calendar date shall be as follows.

+

[yearE][monthE][dayE]

+
EXAMPLE +

'1985Y4M12D', calendar year 1985, April 12th.

+
+

6.2.3. Ordinal date

A complete representation of an ordinal date shall be as follows.

+

[yearE][dayoE]

+
EXAMPLE +

'1985Y102O', calendar year 1985, ordinal day 102 of year.

+
+

6.2.4. Week date

A complete representation of a week date shall be as follows.

+

[yearE][weekE][daykE]

+
EXAMPLE +

'1985Y15W5K', calendar year 1985, Friday of the calendar week 15.

+
+

6.3. Time of day

6.3.1. Local time of day

Representations of local time of day as defined below make no +provisions to prevent ambiguities in expressions that result from +discontinuities in the local time scale (e.g. daylight-saving time). +When the need arises to prevent these ambiguities, the representations +provided in Clause 6.6 may serve useful.

+

A complete representation of local time of day shall be as follows. +This representation shall be denoted as [timeE].

+

["T"][hourE][minE][secE]

+
EXAMPLE +

'T23H20M50S', a local time of day expression describing the fiftieth +seconds of the twentieth minute of the twenty-third clock hour.

+
+

6.3.2. Beginning of the day

The complete representation of beginning of day in explicit form shall +be as follows.

+

T0H0M0S

+

Applying the rule of omitting zero-valued time scale components, it can also +be represented as:

+

T0S

+

There is no representation of end of day to prevent ambiguity of the +overlapping end of day and the beginning of the next day.

+

6.4. Time shift

A time shift is used to represent the shift of local standard time +against UTC.

+

The complete representation of time shift in explicit form is represented +as follows, and is denoted as [shiftE] within this document.

+

["Z"][!]["-"][timeE]

+

Where,

+ +

+ ["Z"] is the time shift designator; +

+

+ the leading minus sign (["-"]) is only applied when the time shift +expressed is behind UTC, it shall be omitted if the time shift is +ahead of or equal to UTC; +

+

+ the expression [timeE] indicates the actual time shift from UTC. +

+ +

In accordance with Clause 6.10, zero-valued +time scale components may be omitted in [timeE].

+
EXAMPLE 1 +

'Z-5H', the time shift is 5 hours behind UTC.

+

 

+
EXAMPLE 2 +

'Z8H', the time shift is 8 hours ahead of UTC.

+

 

+
EXAMPLE 3 +

'Z6H0M', the time shift is six hours ahead of UTC; the expression '0M' may be omitted +in accordance with Clause 6.10.

+

 

+
EXAMPLE 4 +

'Z8H30M10S', the time shift is eight hours, thirty minutes and ten seconds ahead of UTC.

+
+

A single ["Z"] with the [timeE] portion empty, in accordance with the +rules specified in Clause 6.10, indicates that the +time shift from UTC of day is zero, and is functionally equivalent to +the representation 'Z0H0M'.

+

["Z"]

+
EXAMPLE 5 +

'Z', UTC where the time shift is zero.

+

 

+
EXAMPLE 6 +

'Z0H0M', UTC where the time shift is zero.

+
+

6.5. Date with shift

The complete representation for date with a time shift is as follows.

+

[dateE][shiftE]

+
EXAMPLE +

'1985Y4M12DZ-5H', calendar year 1985, April 12th with a time shift of 5 hours behind UTC.

+
+

6.6. Time of day with time shift

The complete representation for time of day with a time shift is as follows.

+

[timeE][shiftE]

+
EXAMPLE 1 +

'T23H20M50SZ', 23:20:50 at UTC of day.

+

 

+
EXAMPLE 2 +

'T23H20M50SZ-5H0M', 23:20:50 at local time, which is 5 hours behind UTC.

+

 

+
EXAMPLE 3 +

'T23H20M50SZ8H', 23:20:50 at local time, which is 8 hours ahead of UTC.

+
+

6.7. Date and time of day

A time can be expressed by combining a date expression (Clause 6.2) +with a time of day expression (Clause 6.3).

+

The date part of a date and time expression must be complete. The time +may be incomplete (Clause 6.13).

+

The representations provided in this clause are collectively denoted as +[datetimeE].

+

6.7.1. Date and time only

The complete representation for date and time only is as follows.

+

[dateE][timeE]

+
EXAMPLE +

'1985Y4M12DT23H20M30S', calendar year 1985, April 12th, 23:20:30.

+
+

6.7.2. Date and time with shift

The complete representation for date with time and a time shift is as follows.

+

[dateE][timeE][shiftE]

+
EXAMPLE +

'1985Y4M12DT23H20M30SZ8H', calendar year 1985, April 12th, 23:20:30, 8 hours ahead of UTC.

+
+

6.8. Decade

The complete representation for decade is as follows.

+

[decE]

+
EXAMPLE +

'1880', the decade 1880s, spanning years from 1880 to 1889.

+
+

6.9. Century

The complete representation for century is as follows.

+

[centE]

+
EXAMPLE +

'1300', the century 1300s, spanning years from 1300 to 1399.

+
+

6.10. Omission of zero valued components

Time scale components within an explicit form that has a value of 0 may be omitted entirely with its corresponding designator, except when the omission of it affects the indication of precision.

+

In the representations given in this clause, if a time scale component of a higher order (compared to the lowest order component specified in the representation) is omitted, it is assumed to have the value "0" as long as the time scale component accepts the value "0" (ISO 8601-1:--, Clause 4.3).

+
EXAMPLE 1 +

'1985Y4M15DT15H0M10S' and '1985Y4M15DT15H10S' can be both used to express +the time 3:00:10 p.m. on April 15th, 1985 in the Gregorian calendar.

+

 

+
EXAMPLE 2 +

'1988Y3M1DT2H0M0S' and '1988Y3M1DT2H' are unequal representations where the former expression has seconds precision, and the latter expression has hour precision.

+

 

+
EXAMPLE 3 +

'2018Y8M8DT30M0SZ': indicates the date 8th August 2018 at time 00:30:00 in UTC time of day Since the "hour" component is omitted and "seconds" included, the hour is assumed to be zero, and the expression has seconds precision. This is equivalent to the expression '2018Y08M08DT30M0SZ' in which zero padding is applied to calendar month and calendar day.

+
+

6.11. Indication of precision

The lowest denoted time scale component in a date and time representation +indicates the precision level of the representation.

+
EXAMPLE 1 +

'1985Y4M' has calendar month precision.

+

 

+
EXAMPLE 2 +

'1985Y4M12DT2H' has clock hour precision.

+

 

+
EXAMPLE 3 +

'1985Y4M12DT30M' has clock minute precision, where the clock hour time +scale component is a zero-valued omission.

+
+

6.12. Decimal fractions for time

A decimal fraction of hour, minute or second may be included in an expression in accordance with ISO 8601-1:--, Clause 5.2.1.4.

+
EXAMPLE 1 +

'2018Y8M8DT0,5H': indicates the date 8th August 2018 at time 00:30 with minutes precision.

+

 

+
EXAMPLE 2 +

'2018Y8M8DT10H30.5M': indicates the date 8th August 2018 at time 10:30:30 with seconds precision.

+

 

+
EXAMPLE 3 +

'2018Y8M8DT10H30M15,3S': indicates the date 8th August 2018 at time 10:30:15 plus 300ms with sub-second precision.

+
+

6.13. Representations other than complete

Any of the representations given in this clause may be modified for reduced precision +(Clause 6.11) and decimal representation (Clause 6.12).

+
EXAMPLE 1 +

'2018Y8M': indicates the date August 2018 with calendar month precision.

+

 

+
EXAMPLE 2 +

'2018Y8M8DT30M': indicates the date 8th August 2018 at time 00:30 with minute precision. Since the "hour" component is omitted, it is assumed to be zero because it is of a higher order than the lowest order component specified in the representation (here, "minutes). The omitted "`second" component does not form part of the representation because it is of a lower order than the lowest order component.

+
+

6.14. Time interval

6.14.1. General

A time interval shall be expressed by a start and an end date. +A solidus ["/"] is used as a separator to separate the two start and +end dates.

+

The complete representation of a time interval is defined as follows.

+

[datetimeE]["/"][datetimeE]

+
EXAMPLE +

'1985Y4M12DT23H20M50S/1985Y6M25DT10H30M0S', time interval beginning at +20 minutes and 50 seconds past 23 hours on 12 April 1985 local time of +day and ending at 30 minutes past 10 hours on 25 June 1985 local time +of day.

+
+

6.14.2. Duration substitution

Providing a duration as an alternative to either a start or end date is +acceptable, given the start and end dates can be inferred from the given +duration of the time interval.

+
EXAMPLE 1 +

'1985Y4M12DT23H20M50S/P3D'

+

 

+
EXAMPLE 2 +

'P3D/1985Y4M12DT23H20M50S'

+
+

6.14.3. Time scale component order

For expression of a time interval by a start and an end, higher order +time scale components may be omitted from the "end of time interval", +provided that the resulting expression is unambiguous. In this case the +omitted higher order components from the "start of time interval" +expression apply.

+
EXAMPLE +

'2018Y1M15D/2M20D' represents '2018Y1M15D/2018Y2M20D' as the expression +'2M20D' unambiguously refers to the calendar month and calendar day +components, and the higher order components can be inherited from the +start date expression.

+
+

6.14.4. Time shift indication

Representations for time zones and UTC included with the component +preceding the separator shall be assumed to apply to the component +following the separator, unless a corresponding alternative is included.

+
EXAMPLE +

'2018Y1M15DZ5Y0M/2018Y2M20D' is equivalent to +'2018Y1M15DZ5Y0M/2018Y2M20DZ5Y0M' as the 'Z5H0M' time shift also +applies to the expression after the separator.

+
+
+
+

7.  Explicit duration

+

7.1. General

Duration can be expressed by a combination of time scale units +in explicit form — years, months, weeks, days, hours, minutes, and seconds.

+

These time scale components are specified in +Clause 4, and are used to specify +positive duration.

+

7.2. Durational units

Time scale unit components are used to compose a duration expression, +and are defined as "durational units".

+

The following time scale components can be combined +to form a representation denoted as [durationUnits] +for the expression of duration.

+

[yearE][monthE][weekE][dayE]["T"][hourE][minuteE][secondE]

+

Where,

+ +

+ each time scale component acting as a durational unit +(such as [monthE]) may be omitted; +

+

+ the time designator symbol ["T"] is used to separate +the time scale components relating to the clock from those of +the calendar. +

+ +

Within [durationUnits], time scale components of higher order +shall be expressed before those of lower order.

+

7.3. Representations

7.3.1. General

+ +

The following representations are both considered complete +representations of duration.

+
+

7.3.2. Composite representation

The composite representation of a duration, fully accepting +expressions of the duration representation given in +ISO 8601-1:--, Clause 5.2.3, is given as follows.

+

[!]["-"]["P"][durationUnits]

+

Where,

+ +

+ [durationUnits] contains time scale components for expressing +positive duration. +

+ +
EXAMPLE 1 +

'P3D', duration of three days.

+

 

+
EXAMPLE 2 +

'P3W2D', duration of three weeks and two days, which is 23 days, as +equivalent to the expression of 'P23D'.

+

 

+
EXAMPLE 3 +

'P180Y800D', duration of one-hundred-and-eighty years and eight-hundred days.

+
+

NOTE  The exact duration for some time scale components can only be +known when placed on the actual time scale.

+

7.3.3. Precedence representation

The precedence representation of a duration is used for specifying +author intent in the evaluation order of time scale components within +a duration.

+

The representation of calendar duration time scale components +(denoted as [calendarD]) is provided as follows.

+

["P"][calendarDU]

+

Where,

+ +

+ [calendarDU] is one of [yearE], [monthE], [weekE], [dayE]. +

+ +
EXAMPLE 1 +

P3D describes a duration of three days, in accordance with [calendarD].

+
+

The representation of clock duration time scale components +(denoted as [clockD]) is provided as follows.

+

["P"]["T"][clockDU]

+

Where,

+ +

+ [clockDU] is one of [hourE], [minuteE], [secondE]. +

+ +
EXAMPLE 2 +

PT8H describes a duration of eight hours, in accordance with [clockD].

+
+

The duration precedence representation is described as follows, +denoted as [durationP].

+

[!]["-"][durC-1][durC-2]...[durC-n]

+

Where,

+ +

+ [durC-i] is either [calendarD] or [clockD]; +

+

+ the order of the [durC-i] components is used to determine the +evaluation precedence order of the duration statement [durationP]. +

+ +
EXAMPLE 3 +

P1YP3MP2D describes a duration of one year, three months +and two days, to be evaluated in the order as described.

+

 

+
EXAMPLE 4 +

P2DP3MP1Y describes a duration of two days, three months +and one year, to be evaluated in the order as described.

+

 

+
EXAMPLE 5 +

PT10HP2DP3MP1Y describes a duration of ten hours, two days, three months +and one year, to be evaluated in the order as described.

+
+

7.4. Negative duration

A duration with a negative value represents a duration in the reverse +direction of the proceeding time scale.

+
EXAMPLE 1 +

-P20Y3M describes a negative duration of twenty years and three months ago.

+

 

+
EXAMPLE 2 +

-P2DP3MP1Y describes a negative duration of two days, three months +and one year, to be evaluated in the order as described.

+
+

7.5. Fractional duration

+ +

A duration representation can be modified to accept a fractional value +in place of any [i] specified in a durational time scale component.

+
+

7.6. Exact duration

7.6.1. General

+ +

This clause describes methods to resolve exact duration in +face of ambiguities.

+
+

7.6.2. Context-dependent duration

The exact duration of some time scale units can only be known +when placed on the actual time scale.

+
EXAMPLE 1 +

'P1Y' duration could be 365 or 366 calendar days depending on +whether the year is a leap year.

+

 

+
EXAMPLE 2 +

'P3M' duration could be 90, 91, 92 days depending on the actual +calendar months and calendar year.

+

 

+
EXAMPLE 3 +

'PT1M' duration is normally 60 seconds, but when the minute is the +last minute of the year, it could be 59, 60 or 61 seconds long +depending on whether a leap second is applied.

+

 

+
EXAMPLE 4 +

'P1Y2M15DT12H30M', duration of 1 year, 2 months, 15 days, 12 hours +and 30 minutes. The actual duration of the involved calendar months can +only be known when the duration is placed on an actual start date.

+
+

7.6.3. Speculative duration

The exact duration of certain time scale unit may only be known +after an event occurs.

+

There is no universal rule to calculate leap seconds in advance, since +the decision to insert a leap second is driven by a number of dynamic +factors and only known when announced by the BIPM.

+

Specifically, the exact duration of the last clock minute of a +calendar year can only be known after it is announced by the BIPM, +whether a leap second has or will occur (in UTC). +This event is described in this document to occur at the +"leap second horizon date" for a calendar year.

+

The exact duration of the last clock minute in a calendar year +is one of the following duration:

+ +

+ when there is a positive leap second, 61 clock seconds; +

+

+ when there is no leap second, 60 clock seconds; and +

+

+ when there is a negative leap second, 59 clock seconds. +

+ +

For the accuracy of general purposes, it is acceptable to assume +the last clock minute always contains 60 clock seconds, just like +any other clock minute.

+

For cases where durational accuracy at the clock second level is +of importance, the following steps shall be taken:

+ +

+ When calculating exact duration prior to the leap second horizon +date of a specific calendar year involved, the last clock +minute is assumed to have no leap second, such that 59 is always +the last second of the year; +

+

+ When calculating exact duration after the leap second horizon +date of a specific calendar year involved, the last clock +minute shall reflect the actual duration. +

+ +
EXAMPLE 1 +

'P3000Y12M31DT23H59M' is considered to have a duration of 60 clock seconds, +as the calendar year 3000’s leap second horizon date has not yet +occurred.

+

 

+
EXAMPLE 2 +

'P2016Y12M31DT23H59M' is considered to have a duration of 61 clock seconds, +since the leap second horizon date has already occurred, and it is known +that a positive leap second assigned to the calendar year 2016.

+
+
+
+

8.  Evaluation of date and time with duration

+

8.1. General

A date and time representation is modified by a duration +in many cases, including the calculation for:

+ +

+ time intervals when given duration as a start or end; +

+

+ boundaries of grouped time scale units (Clause 5); +

+

+ conversion between of UTC of day and local time of day via time shifts; and +

+

+ occurrences of recurring time intervals. +

+ +

This clause provides methods to calculate a consistent result +date and time, given an origin date and time ("origin") +and a duration time scale component (duration) to apply.

+

Modification of a date and time representation with +a duration is described using the following representation, +called a "date time formula".

+

resolve(date, duration)

+

or

+

date + duration

+
EXAMPLE +

2018Y9M10D + P1D is a date time formula.

+
+

8.2. Prerequisite mechanisms

8.2.1. Carry-over of overflow in time scale components

An "overflow" of a date and time expression is defined as assigning a +value exceeding the maximum value accepted by the time scale component.

+
EXAMPLE 1 +

An increase of P1M (duration) to 2018Y12M (date) will result in the expression +2018Y13M, where the month component is overflowed with value 13.

+
+

An overflow is considered resolved once the overflowed time scale unit +has transferred its excess to the immediate higher order time scale +component.

+
EXAMPLE 2 +

The overflowed expression 2018Y13M can be resolved to 2019Y1M.

+
+

An overflow can cause multiple carry-overs when the overflow not only +causes the immediate higher order time scale component to overflow, but +also subsequent higher order components.

+
EXAMPLE 3 +

The overflowed expression 2018Y12M366D can be resolved to 2018Y24M1D +(which still contains an overflow), which can be resolved to +2019Y12M1D (where there is no more overflow).

+
+

8.2.2. Truncation at time scale component boundaries

A modification made to a higher order time scale component may +cause the value of a lower order time scale component to go beyond +its value boundaries. This condition is described as +"out of bounds" of a date and time expression.

+

This situation occurs when a modification is made to the values of +certain time scale components, because a lower order component +always has its maximum value bound by its immediate higher order +component:

+ +

+ clock minute (clock second value of 60 is only valid for a leap +second); +

+

+ calendar month (calendar day values 29, 30, 31 are invalid for +some months); and +

+

+ calendar year (ordinal day value of 366 and calendar month/day +combination of February 29th is only valid for a leap year). +

+ +
EXAMPLE 1 +

An increase of P1M (duration) to 2018Y1M31D (date) will result in +the expression 2018Y2M31D, which is an invalid date representation +as the calendar day value of 31 has exceeded the boundary of its +immediate higher order component, the month 2 (February).

+

 

+
EXAMPLE 2 +

An increase of P1Y (duration) to 2016Y12M31DT23H59M60S (date) will result in +the expression 2017Y12M31DT23H59M60S, which is an invalid date representation +as the clock second value of 60 has exceeded the boundary of its +immediate higher order component, the clock minute with its last second +at 59.

+
+

An out of bounds situation is considered resolved once the excess +value is truncated at the violating (lower order) time scale component.

+
EXAMPLE 3 +

The out of bounds expression 2019Y2M29D`" can be truncated to `2019Y2M28D.

+

 

+
EXAMPLE 4 +

The out of bounds expression 2020Y366O`" can be truncated to `2020Y365O.

+
+

8.3. Simple duration

A simple duration is a duration expression with only +a single time scale component.

+

Evaluation of a date time formula that contains a simple duration +is to directly apply the durational unit to the corresponding +time scale component of the date and time representation +and applying carry-over.

+

The steps are as follows:

+ +

+ Take the value of the time scale component in the simple duration, +directly modify the value of the corresponding time scale component +in the date and time representation. +

+

+ In the resulting date and time representation, start from the +lowest order overflowed time scale component, perform carry-over +until there is no more overflow in the representation. +

+

+ If any time scale components have become invalid, apply +truncation to them. +

+

+ The resulting date and time representation is complete. +

+ +
EXAMPLE

Calculation of 2022Y2M28D + P3D:

+ +

+ Direct modification of date and time representation, obtains 2022Y2M31D. +

+

+ Apply carry-over to overflowed components, obtains 2022Y3M02D. +

+
+

8.4. Composite duration

The method of evaluating of a date time formula with a +composite duration (Clause 7.3.2) is to directly +apply the durational units to the date and time representation +without truncation, and only applying carry-over at the end.

+

The steps are as follows:

+ +

+ For all values of time scale components in the composite duration, +directly modify the values of the corresponding time scale components +in the date and time representation. +

+

+ In the resulting date and time representation, start from the +lowest order overflowed time scale component, perform carry-over +on all overflowed time scale components, until there is no more +overflow in the representation. +

+

+ If any time scale components have become invalid, apply +truncation to them. +

+

+ The resulting date and time representation is complete. +

+ +
EXAMPLE

Calculation of 2022Y2M30D + P1Y3M2D:

+ +

+ Direct modification of date and time representation, obtains 2023Y5M32D. +

+

+ Apply carry-over to overflowed components, obtains 2023Y6M31D. +

+

+ The resulting representation is 2023Y6M31D. +

+
+

8.5. Precedence duration

The method of evaluating of a date time formula with a +precedence duration (Clause 7.3.3) is to apply the +durational units one by one to the date and time representation +with truncation and carry-over at every step.

+

The steps are as follows:

+ +

+ Starting at the left side of the precedence duration expression, +process every durational unit one by one as follows: + +

+ Use the durational unit (which only contains one time scale +component), to modify the corresponding time scale component (the "target component") +in the date and time representation. +

+

+ If the target component has overflowed in the previous step, +perform carry-over (to higher order time scale components), +until there is no more overflow in the representation. +

+

+ If any time scale components of lower order than the +target component have become invalid, apply truncation +to them. +

+ +

+

+ Once all durational units have been processed, the +resulting date and time representation is complete. +

+ +
EXAMPLE 1

Calculation of 2022Y2M29D + P1YP3MP2D:

+ +

+ Process the first durational unit: (2022Y2M29D + P1Y) + P3MP2D. +

+

+ Apply the first durational unit to the date and time representation: +2023Y2M29D + P3MP2D. +

+

+ No carry-over is necessary since there is no overflow. +

+

+ Since 29D is of lower order than the target component (calendar +year), the representation is truncated: 2023Y2M28D + P3MP2D. +

+

+ Process the second durational unit: (2023Y2M28D + P3M) + P2D. +

+

+ Apply the second durational unit to the date and time representation: +2023Y5M28D + P2D. +

+

+ No carry-over is necessary since there is no overflow. +

+

+ No component of lower order than the target component is invalid, +hence truncation is not necessary. +

+

+ Process the third durational unit: 2023Y5M28D + P2D. +

+

+ Apply the third durational unit to the date and time representation: +2023Y5M31D. +

+

+ No carry-over is necessary since there is no overflow. +

+

+ No component of lower order than the target component is invalid, +hence truncation is not necessary. +

+

+ The resulting date and time representation is 2023Y5M31D. +

+

 

+
EXAMPLE 2

Calculation of 2022Y2M29D + P2DP3MP1Y:

+ +

+ Process the first durational unit: (2022Y2M29D + P2D) + P3MP1Y. +

+

+ Apply the first durational unit to the date and time representation: +2022Y2M31D + P3MP1Y. +

+

+ Carry-over is necessary since there is the target component has overflowed: +2022Y3M2D + P3MP1Y. +

+

+ No component of lower order than the target component is invalid, +hence truncation is not necessary. +

+

+ Process the second durational unit: (2022Y3M2D + P3M) + P1Y. +

+

+ Apply the second durational unit to the date and time representation: +2022Y6M2D + P1Y. +

+

+ No carry-over is necessary since there is no overflow. +

+

+ No component of lower order than the target component is invalid, +hence truncation is not necessary. +

+

+ Process the third durational unit: 2022Y6M2D + P1Y. +

+

+ Apply the third durational unit to the date and time representation: +2023Y6M2D. +

+

+ No carry-over is necessary since there is no overflow. +

+

+ No component of lower order than the target component is invalid, +hence truncation is not necessary. +

+

+ The resulting date and time representation is P1Y. +

+
+

8.6. Involving fractional duration

When fractional duration (Clause 7.5) is applied +to context-dependent durational units (Clause 7.6.2), +it is necessary to resolve the fractional duration in context.

+
EXAMPLE 1 +

The expression P0.5M ("half a month") is ambiguous because +the exact duration of a calendar month depends on its context, +and that the context for which P0.5M is anchored to is unclear.

+
+

The duration of a fractional, context-dependent, durational unit +can be obtained by first calculating a single unit of the durational +unit in context, such that, the exact duration for the durational +unit in whole (e.g. "P1M") becomes known. Once the exact duration +of a single unit is known, the duration of the fractional unit can +be calculated.

+

date + frac-dur =
  duration(date + unit(frac-dur), date) × value(frac-dur) + date

+

Where,

+ +

+ unit(frac-dur) is the value of a single unit used in the duration frac-dur; +

+

+ value(frac-dur) is the fractional value used with the duration frac-dur; +

+

+ duration(date1, date2) is a function to calculate the duration between two dates or times, +such as Clause 8.4 or Clause 8.5. +

+ +

Given that "date + unit(frac-dur)" can be calculated, this +method always produces a consistent value.

+
EXAMPLE 2

Given the expression: 2018-01-23 + P0.5M:

+ +

+ It is rephrased as duration(2018-01-23 + P1M, 2018-01-23) × 0.5 + 2018-01-23. +

+

+ It is reduced to duration(2018-02-23, 2018-01-23). +

+

+ Then P31D × 0.5 + 2018-01-23. +

+

+ Then P15.5D + 2018-01-23. +

+

+ Since P15.5D is an exact duration (duration of calendar day is +known), P15.5D + 2018-01-23`" is resolvable and gives the final result`2018-02-07T12:00:00. +

+
+

8.7. Involving speculative duration

As described in Clause 7.6.3, there is no universal +rule to calculate leap seconds in advance, since the decision +to insert a leap second is driven by a number of dynamic +factors and only known when announced by the BIPM.

+

The rules specified in Clause 7.6.3 are used +to evaluate a date time formula that involves leap seconds.

+
EXAMPLE 1

This example applies identically with or without a leap second. Given the expression: 2018-12-31T23:59:59 + PT1M:

+ +

+ Apply the durational unit clock minute directly to the representation: 2018-12-31T23:60:59 +

+

+ Since 59 is the last clock minute, treat the overflow with carry-over: 2018-12-31T24:00:59 +

+

+ Since 23 is the last clock hour, treat the overflow with carry-over: 2018-12-32T00:00:59 +

+

+ Since 31 is the last calendar day of year, treat the overflow with carry-over: 2018-13-01T00:00:59 +

+

+ Since 13 is the last calendar month, treat the overflow with carry-over: 2019-01-01T00:00:59 +

+

+ The resulting expression is 2019-01-01T00:00:59. +

+

 

+
EXAMPLE 2

Given the expression containing a leap second: 2016-12-31T23:59:60 + PT1M:

+ +

+ Apply the durational unit clock minute directly to the representation: 2016-12-31T23:60:60 +

+

+ Since 59 is the last clock minute, treat the overflow with carry-over: 2016-12-31T24:00:60 +

+

+ Since 23 is the last clock hour, treat the overflow with carry-over: 2016-12-32T00:00:60 +

+

+ Since 31 is the last calendar day of year, treat the overflow with carry-over: 2016-13-01T00:00:60 +

+

+ Since 13 is the last calendar month, treat the overflow with carry-over: 2017-01-01T00:00:60 +

+

+ The clock second 60 is out of bounds, it is truncated to the maximum value: 2017-01-01T00:00:59 +

+

+ The resulting expression is 2017-01-01T00:00:59. +

+

 

+
EXAMPLE 3

Given the expression containing a leap second: 2016-12-31T23:59:59 + PT1S:

+ +

+ Apply the durational unit clock second directly to the representation: 2016-12-31T23:59:60 +

+

+ The resulting expression is 2016-12-31T23:59:60. +

+
+
+
+
+

Bibliography

+

[1]  ISO/IEC 646, Information technology — ISO 7-bit coded character set for information interchange

+

[2]  ISO 8601:2004, Data elements and interchange formats — Information interchange — Representation of dates and times

+

[3]  ISO 8601-2:--, Date and time — Representation for information interchange — Part 2: Extensions

+
+
+
+ + + +------=_NextPart_9777c15e.6c32.4720 +Content-Location: file:///C:/Doc/csd-datetime-explicit_files/filelist.xml +Content-Transfer-Encoding: base64 +Content-Type: application/xml + +PHhtbCB4bWxuczpvPSJ1cm46c2NoZW1hcy1taWNyb3NvZnQtY29tOm9mZmljZTpvZmZpY2UiPgog +ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL2NzZC1kYXRldGltZS1leHBsaWNpdC5odG0iLz4g +IDxvOkZpbGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRt +bCIvPgo8L3htbD4K + +------=_NextPart_9777c15e.6c32.4720 +Content-Location: file:///C:/Doc/csd-datetime-explicit_files/header.html +Content-Transfer-Encoding: base64 +Content-Type: text/html charset="utf-8" + +PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiDQp4bWxuczpvPSJ1 +cm46c2NoZW1hcy1taWNyb3NvZnQtY29tOm9mZmljZTpvZmZpY2UiDQp4bWxuczp3PSJ1cm46c2No +ZW1hcy1taWNyb3NvZnQtY29tOm9mZmljZTp3b3JkIg0KeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMu +bWljcm9zb2Z0LmNvbS9vZmZpY2UvMjAwNC8xMi9vbW1sIg0KeG1sbnM6bXY9Imh0dHA6Ly9tYWNW +bWxTY2hlbWFVcmkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy9UU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DpmaWVs +ZC1zZXBhcmF0b3InPjwvc3Bhbj48L3NwYW4+PC9iPjwhW2VuZGlmXS0tPjxiDQpzdHlsZT0nbXNv +LWJpZGktZm9udC13ZWlnaHQ6bm9ybWFsJz48c3BhbiBsYW5nPUVOLUdCIHN0eWxlPSdmb250LXNp +emU6MTAuMHB0Ow0KbXNvLWJpZGktZm9udC1zaXplOjExLjBwdCc+PHNwYW4gc3R5bGU9J21zby1u +by1wcm9vZjp5ZXMnPjM8L3NwYW4+PC9zcGFuPjwvYj48IS0tW2lmIHN1cHBvcnRGaWVsZHNdPjxi +DQpzdHlsZT0nbXNvLWJpZGktZm9udC13ZWlnaHQ6bm9ybWFsJz48c3BhbiBsYW5nPUVOLUdCIHN0 +eWxlPSdmb250LXNpemU6MTAuMHB0Ow0KbXNvLWJpZGktZm9udC1zaXplOjExLjBwdCc+PHNwYW4g +c3R5bGU9J21zby1lbGVtZW50OmZpZWxkLWVuZCc+PC9zcGFuPjwvc3Bhbj48L2I+PCFbZW5kaWZd +LS0+PHNwYW4NCmxhbmc9RU4tR0Igc3R5bGU9J2ZvbnQtc2l6ZToxMC4wcHQ7bXNvLWJpZGktZm9u +dC1zaXplOjExLjBwdCc+PG86cD48L286cD48L3NwYW4+PC9wPg0KDQo8L2Rpdj4NCg0KPC9ib2R5 +Pg0KDQo8L2h0bWw+DQo= + +------=_NextPart_9777c15e.6c32.4720-- \ No newline at end of file diff --git a/csd-datetime-explicit.html b/csd-datetime-explicit.html new file mode 100644 index 0000000..6709f56 --- /dev/null +++ b/csd-datetime-explicit.html @@ -0,0 +1,2551 @@ + + + + Date and time — Explicit representation + + + + + + + + + + + + + + +
+

Final Draft

+
+ +
+

CalConnect Standard

+
+ + + +
+ +
+ + +
+
+ +
+
+ CC/FDS 18011:2018 + +
+ +
+ Date and time — Explicit representation + +
+
+ + + +
+ TC VCARD, CALENDAR +
+ + + +
+ +
+
+ CalConnect Standard +
+ +
+ +
+ + + + + +
+
+ + + +
+

 

+
+
+
+ + +
+ +

 

+
+
+
+
+
+

Foreword

+

The Calendaring and Scheduling Consortium ("CalConnect") is global non-profit +organization with the aim to facilitate interoperability of technologies across +user-centric systems and applications.

+

CalConnect works closely with liaison partners including international +organizations such as ISO, OASIS and M3AAWG.

+

The procedures used to develop this document and those intended for its further +maintenance are described in the CalConnect Directives.

+

In particular the different approval criteria needed for the different types of +CalConnect documents should be noted. This document was drafted in accordance with the +editorial rules of the CalConnect Directives.

+

Attention is drawn to the possibility that some of the elements of this +document may be the subject of patent rights. CalConnect shall not be held responsible +for identifying any or all such patent rights. Details of any patent rights +identified during the development of the document will be in the Introduction +and/or on the CalConnect list of patent declarations received (see +www.calconnect.com/patents).

+

Any trade name used in this document is information given for the convenience +of users and does not constitute an endorsement.

+

This document was prepared by Technical Committee VCARD, CALENDAR.

+
+
+
+

Introduction

+

ISO 8601:2004 has been the international standard for date and time representations +and is applied widely, including in the RFC5545 and RFC6350 standards.

+

However, the representations provided in ISO 8601:2004 require +fixed-length digits for time scale components, such as the +4-digit year, does not accept negative values, and does not +allow omission of a time scale component that has a zero value.

+

This document extends the "duration" representation +defined in ISO 8601:2004 to fulfill the need of a flexible-length +representation, called the "explicit form".

+
+

Date and time — Explicit representation

+
+

1.  Scope

+

The purpose of this document is to provide:

+
    +
  • +

    a standard, declarative representation of date and time and time +scale components called the "explicit form";

    +
  • +
  • +

    a grouped time scale unit mechanism for grouping of date and time; +and

    +
  • +
  • +

    new duration representations and mechanics for the calculation of +date time formulas involving duration.

    +
  • +
+

This document only supports date elements from the Gregorian calendar and +times from the 24-hour clock.

+

Date and time format representations described in this document +utilizes numbers, alphabets and symbols defined in ISO/IEC 646. +These representations are meant to be both human recognizable and +machine readable. Character encoding of the representations is +not covered in this document.

+
+
+

2.  Normative references

+

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

+

ISO 8601-1:--, Date and time — Representation for information interchange — Part 1: Basic rules

+
+

3.  Terms, definitions, symbols and abbreviated terms

For the purposes of this document, the terms and definitions + given in ISO 8601-1:-- and the following apply.

+

3.1. Terms and definitions

3.1.1 

explicit form

+ +

date and time representation that uses designator symbols to delimit time scale components

+ +

3.1.2 

designator symbols

+ +

characters used to denote units of a time scale component

+ +

3.1.3 

date time formula

+ +

expression that specifies modification of a date and time expression (ISO 8601-1:--, Clause 3.1.3.1) with a duration (ISO 8601-1:--, Clause 3.1.1.8)

+ +

3.1.4 

durational unit

+ +

time scale component (ISO 8601-1:--, Clause 3.1.3.3) that compose the duration (ISO 8601-1:--, Clause 3.1.1.8) date and time representation (ISO 8601-1:--, Clause 3.1.3.2)

+ +

3.1.5 

grouped time scale unit

+ +

time scale unit (ISO 8601-1:--, Clause 3.1.1.7) composed of a duration (ISO 8601-1:--, Clause 3.1.1.8) expressed by one or more durational units (Clause 3.1.4)

+

3.2. Symbols and abbreviated terms

3.2.1 

General

+ +

Representations specified in this document make use of symbols given in ISO 8601-1:-- and the following.

+ +

3.2.2 

Time scale component symbols

+ +

c(feat)

+

the left side of representation statement where "c" is a time scale component (e.g. "year") and "feat" is a feature, for example, "m" for a time scale component that accepts negative values

+

yearE

+

time scale component calendar year in explicit form

+

monthE

+

time scale component calendar month in explicit form

+

weekE

+

time scale component calendar week of year in explicit form

+

dayE

+

time scale component calendar day of month in explicit form

+

daykE

+

time scale component calendar day of week in explicit form

+

dayoE

+

time scale component calendar day of year in explicit form

+

hourE

+

time scale component clock hour in explicit form

+

minE

+

time scale component clock minute in explicit form

+

secE

+

time scale component clock second in explicit form

+

decE

+

time scale component decade in explicit form

+

centE

+

time scale component century in explicit form

+
+ +

3.2.3 

Composite component symbols

+ +

dateE

+

the composite time scale components for the complete representation of a date as determined in Clause 6.2.1

+

timeE

+

the composite time scale components for the complete representation of a time of day as determined in Clause 6.3.1

+

shiftE

+

the composite time scale component for time shift in basic form with hours and minutes, as determined in Clause 6.4

+

durationE

+

the composite time scale units for the representation of a duration as determined in ISO 8601:2004

+
+ +

3.2.4 

Symbols used in place of digits or signs

These symbols are used to represent characters in the date and time representations. They are used in representations only, and are replaced by one or more characters, as described, in expressions:

+

!

+

indicates that the token following this symbol is optional (may be omitted)

+

n

+

a positive integer or value, may be left absent to signify an unbounded value

+

i

+

a positive integer

+

negi

+

a positive or negative integer; equivalent to [!]["-"][i]

+
+

3.2.5 

Designator symbols

These symbols are used to represent designators in the date and time expressions:

+

"-"

+

a minus sign represented by the character "`-"` to indicate a negative value

+

"K"

+

the calendar day of week designator, represented by the character "K", preceding a data element which represents the ordinal number of a calendar day within a calendar week

+

"J"

+

the decade designator, represented by the character "J", preceding a data element which represents the number of decades

+

"Y"

+

the year designator, represented by the character "Y", preceding a data element which represents the number of years

+

"M"

+

the month or minute designator, represented by the character "M", preceding a data element which represents the number of months or minutes

+

"W"

+

the week designator, represented by the character "W", preceding a data element which represents the ordinal number of a calendar week within the calendar year

+

"O"

+

the calendar day of year designator, represented by the character "O", preceding a data element which represents the ordinal number of a calendar day within a calendar year

+

"D"

+

the day of month designator, represented by the character "D", preceding a data element which represents the number of days in a month

+

"H"

+

the hour designator, represented by the character "H", preceding a data element which represents the number of hours

+

"S"

+

the second designator, represented by the character "S", preceding a data element which represents the number of seconds

+

"T"

+

the time designator, represented by character "T", indicates:

+
    +
  • +

    the start of the representation of local time of day to designate local time of day expressions as such,

    +
  • +
  • +

    the start of the representation of the time of day in date and time of day expressions,

    +
  • +
  • +

    the start of the representation of the number of hours, minutes or seconds in expressions of duration

    +
  • +
+

"P"

+

the duration designator, represented by the character "P", preceding the component which represents the duration

+

"B"

+

the suffix designator to represent years before year one, represented by the character "B", placed after the time scale components of calendar year, decade and century.

+

"Z"

+

the UTC designator, represented by the character "Z", added to the end of a time representation to indicate that a time of day is represented as UTC of day.

+

"G"

+

the grouped time scale unit prefix designator, represented by the character "G", indicates a grouping calculation applies to the subsequent time scale components until encountering the corresponding suffix designator.

+

"U"

+

the grouped time scale unit suffix designator, represented by the character "U", indicates a grouping calculation applies to the preceding time scale components from the corresponding prefix designator.

+
"x"
+

the representation of any character "x" as according to the textual representation of "x" in the ISO/IEC 646 repertoire

+
+ + +

Note 1 to entry: Although "M" can be used to designate months or for minutes, its meaning is unambiguous in expressions because the time portion shall always be preceded by the time designator "T".

Note 2 to entry: The designator symbol "J" is assigned from its ordinal position +being the tenth letter of the English alphabet.

Note 3 to entry: The "G" and "U" designator symbols are used to demarcate the +"grouped time scale unit" time scale components as they form the +initial letters of the words "group" and "unit".

+

3.2.6 

Separator symbols

In date and time expressions and date and time representations, the following characters are used as separators.

+

"/" (solidus)

+

the "/" solidus character separates start and end times in the representation of a time interval, as well as the symbol 'R' from the remainder of a recurring time interval representation. A solidus may be replaced with a double hyphen ["--"] by mutual agreement of the communicating partners.

+

"." (period) and "," (comma)

+

the "." period and "," comma characters are decimal signs used to separate the integer part from the decimal fraction of a number.

+
+
+

4.  Time scale components and units

+

4.1. General

+ +

Additional properties and the explicit forms of time scale units are +represented in this clause.

+
+

4.2. Order of time scale units

This document refers to an "order" amongst time scale units, which is +defined by the duration of a time scale unit relative to other time +scale units. For example, since a single calendar month has a duration +always greater than a single unit of calendar day, the former is +considered of a higher order time scale unit than calendar day, and +therefore the latter is also considered of a lower order time scale +unit than the former.

+

The relative order of commonly used time scale units is specified +below, with the higher listed entry considered a higher order time +scale unit than a lower listed entry:

+
    +
  1. +

    calendar century

    +
  2. +
  3. +

    calendar decade

    +
  4. +
  5. +

    calendar year

    +
  6. +
  7. +

    calendar month

    +
  8. +
  9. +

    calendar week

    +
  10. +
  11. +

    calendar day

    +
  12. +
  13. +

    clock hour

    +
  14. +
  15. +

    clock minute

    +
  16. +
  17. +

    clock second

    +
  18. +
+

NOTE  a higher order time scale does not necessarily mean its duration +can be expressed as an integer multiple of a lower order time scale, +for example, in the case of calendar month (28, 29, 30 or 31 days) +and calendar week (7 days).

+

4.3. Explicit forms

4.3.1. Value prefixing

Prefixing of the value with one or more "`0`"s (the number zero) to the +integer [i] is allowed in the explicit forms of time scale components.

+
EXAMPLE +

'1M', '01M', and '0001M' all describe the calendar month January.

+
+

4.3.2. Calendar year and years duration

The calendar year and years duration is represented as follows:

+

[i]["Y"]

+
EXAMPLE 1 +

'12Y', duration, twelve years

+
+
EXAMPLE 2 +

'12Y', date, year 12.

+
+

4.3.3. Calendar month and months duration

The calendar month and months duration is represented as follows:

+

[i]["M"]

+
EXAMPLE 1 +

'6M', duration, 6 months.

+
+
EXAMPLE 2 +

'8M', date, the month of August.

+
+

4.3.4. Calendar week of year and weeks duration

The calendar week of year number and weeks duration is represented as +follows:

+

[i]["W"]

+
EXAMPLE 1 +

'10W', duration, ten weeks.

+
+
EXAMPLE 2 +

'22W', date, the twenty-second calendar week of a calendar year.

+
+

4.3.5. Calendar day of month and days duration

The calendar day of month and days duration is represented as follows:

+

[i]["D"]

+
EXAMPLE 1 +

'130D', duration, 130 days.

+
+
EXAMPLE 2 +

'25D', date, the twenty-fifth (25) calendar day of a calendar month.

+
+

4.3.6. Calendar day of week

The calendar day of week is represented as the following time scale component:

+

[i]["K"]

+

Where,

+
    +
  • +

    [i] represents the ordinal day number in the calendar week; +valid values of [i] are the integers 1 to 7, representing Monday to Sunday, +in accordance with "The week calendar" specified in ISO 8601-1:--, Clause 4.2.2.

    +
  • +
+
EXAMPLE 1 +

'1K', calendar day of week Monday

+
+
EXAMPLE 2 +

'3K', calendar day of week Wednesday

+
+
EXAMPLE 3 +

'7K', calendar day of week Sunday

+
+

4.3.7. Calendar day of year

The calendar day of year is represented as the following time scale component:

+

[i]["O"]

+
EXAMPLE +

'351O', ordinal day 351 of the calendar year

+
+

4.3.8. Clock hour and hours duration

Clock hour and hours duration is represented as follows:

+

[i]["H"]

+
EXAMPLE 1 +

'36H', duration, thirty-six hours.

+
+
EXAMPLE 2 +

'6H', time, the sixth clock hour.

+
+

4.3.9. Clock minute and minutes duration

Clock minute and minutes duration is represented as follows:

+

[i]["M"]

+
EXAMPLE 1 +

'72M', duration, 72 minutes.

+
+
EXAMPLE 2 +

'56M', time, the fifty-sixth clock minute.

+
+

4.3.10. Clock second and seconds duration

Clock second and seconds duration is represented as follows:

+

[i]["S"]

+
EXAMPLE 1 +

'300S', duration, 300 seconds

+
+
EXAMPLE 2 +

'28S', duration, the twenty-eighth clock second.

+
+

4.3.11. Decade

The decade is represented as the following time scale component:

+

[i]["J"]

+
EXAMPLE 1 +

'196J' in explicit form represents the decade of the 1960s, spanning the calendar years 1960 to 1969.

+
+
EXAMPLE 2 +

'0J' in explicit form represents the decade spanning calendar years 0 to 9.

+
+

4.3.12. Century

The century is represented as the following time scale component:

+

[i]["C"]

+
EXAMPLE 1 +

'16C', in explicit form represents the century of 1600s, spanning the calendar years 1600 to 1699.

+
+
EXAMPLE 2 +

'0C', in explicit form represents the century spanning the calendar years 00 to 99.

+
+

4.4. Negative values

4.4.1. General

Certain time scale components are allowed to accept a negative integer as their value. The following representation is used for value that accepts a positive or negative integer.

+

negi = [!]["`-`"][i]

+

In order to convert a time scale component to accept negative values, the following representation is used, where c is a time scale component unit. If the time scale component accepts an integer value of '0', the value of the expression '-0' (negative zero) is considered equivalent to that of '0'.

+

c(m) = [negi][c]

+

Where,

+
    +
  • +

    [c] is the time scale component representation that accepts only positive [i];

    +
  • +
  • +

    [m] is a feature label indicating that the time scale component [c] accepts negative values.

    +
  • +
+

This representation only applies to time scale components that describe a time scale unit. Specifically, it does not apply to durations, time intervals, and repeating time intervals.

+
EXAMPLE +

If "c" is the time scale component yearE in explicit form (see Part 1 4.3.2 b)), c(m) means "calendar year accepting a negative value". The explicit year representation [i]["Y"] becomes [negi]["Y"] when [i] is replaced with [negi], and expands to [!]["-"]][i]["Y"], which accepts the representations [i]["Y`"] or ["-"]"Y"]. In this expression, the value of [i] or ["-"`][i] represents an integer whose value identifies a calendar year.

+
+

4.4.2. Calendar year

When a negative calendar year represents a date, the negative value is +to represent the number of years prior to year zero (0).

+

The representation for calendar year that accepts a negative value is as follows.

+

year(m)

+
EXAMPLE 1 +

'-12Y' in date represents the the calendar year -12.

+
+
EXAMPLE 2 +

'-1Y' in date represents the year immediately preceding year 0.

+
+

NOTE  Year zero is expressed as '0Y' in explicit form.

+

4.4.3. Calendar week of year

When a negative calendar week of year represents a date, the negative +value is to represent the number of weeks counting in reverse from the +end of the calendar year, where the last week of the year is +represented by the integer value '-1'.

+

The representation for calendar week of year that accepts a negative value is as follows.

+

week(m)

+
EXAMPLE 1 +

'-10W' in date represents the tenth last week of the year.

+
+
EXAMPLE 2 +

'-3W' in date represents the third last week of the year.

+
+

4.4.4. Calendar day of month

When a negative calendar day of month represents a date, the negative +value is to represent the number of days counting in reverse from the +end of the calendar month, where the last day of the month is +represented by the integer value '-1'.

+

The representation for calendar day of month that accepts a negative value is as follows.

+

day(m)

+
EXAMPLE 1 +

'-1D' in date represents the last day of the month.

+
+
EXAMPLE 2 +

'-5D' in date represents the fifth last day of the month.

+
+

4.4.5. Calendar day of year

When a negative calendar day of year represents a date, the negative value is to represent the number of days counting in reverse from the end of the calendar year, where the last day of the year is represented by the integer value '-1'.

+

The representation for calendar day of year that accepts a negative value is as follows.

+

dayo(m)

+
EXAMPLE 1 +

'-7O' in date represents the seventh last day of the calendar year, which is always December 25th.

+
+
EXAMPLE 2 +

'-306O' in date represents February 29th for a leap year, February 28th otherwise.

+
+

4.4.6. Duration

A duration in the reverse direction, called a "negative duration" in +this document, can be expressed using the following representation +based on the duration representation specified in +ISO 8601-2:--, Clause 5.4.2. +In this case, all time scale component within the duration +representation must be positive.

+

duration(m) = [!]["`-"`][positive-duration]

+

Where,

+
    +
  • +

    [positive-duration] is the [duration] representation that contains only time scale components that have positive [i].

    +
  • +
+
EXAMPLE 1 +

'-P100D' in date represents the duration of 100 days in the reverse direction.

+
+
EXAMPLE 2 +

'-P1Y3D' in date represents the duration of one years and three days in the reverse direction.

+
+
EXAMPLE 3 +

'-P20Y3M' describes a negative duration of twenty years and three months ago.

+
+

4.4.7. Calendar year before year one

A suffix addition to time scale components for calendar year, decade and century +allows representation of calendar years before year one (1).

+

The representation is given as follows.

+

[c]["B"]

+

Where,

+
    +
  • +

    [c] is one of [yearE], [decE], [centE].

    +
  • +
+
EXAMPLE 1 +

'1YB' the first year before year one, equivalent to the effect of '0Y'.

+
+
EXAMPLE 2 +

'12YB' the twelfth year before year one, equivalent to the effect of '-11Y'.

+
+
EXAMPLE 3 +

'12JB' the twelfth decade before year one, equivalent to the effect of time interval +'-119/-110'.

+
+
EXAMPLE 4 +

'12CB' the twelfth century before year one, equivalent to the effect of time interval +'-1190/-1100'.

+
+
+
+

5.  Grouped time scale units

+

5.1. General

+ +

A time scale unit can be grouped into a larger composite unit that +can each be specifically referred to using representations provided +in this clause.

+
+

5.2. Unit definition

A grouped time scale unit ("grouped unit") defines a time scale unit +that is a composite of smaller time scale units. +Its representation is provided as follows +and is denoted as [groupUnit] in this document.

+

["G"][durationUnits]["U"]

+

Where,

+
    +
  • +

    ["G"] is the grouping prefix designator;

    +
  • +
  • +

    ["U"] is the grouping suffix designator;

    +
  • +
  • +

    [durationUnits], one or more time scale components for +expressing positive duration as specified in +duration-general.

    +
  • +
+

The definition of a grouped unit is a continuous one, such that there is no gap between two adjacent grouped units.

+
EXAMPLE 1 +

'G10DU', every unit of the grouped unit is of ten days duration.

+
+
EXAMPLE 2 +

'GT30MU', every unit of the grouped unit is of thirty minutes duration.

+
+
EXAMPLE 3 +

'G2DT6HU', every unit of the grouped unit is of two days and six hours duration.

+
+

5.3. Unit value

The value of a grouped time scale unit is given with +the following representation. +This representation is denoted as [group] in this document.

+

group = [i][groupUnit]

+

Where,

+
    +
  • +

    [i] indicates the coefficient value of the grouped time scale unit;

    +
  • +
  • +

    [groupUnit] denotes an expression for a grouped time scale unit +(grouping-unit).

    +
  • +
+
EXAMPLE 1 +

'5G10DU', the fifth unit of ten-day groups.

+
+
EXAMPLE 2 +

'20GT30MU', the twentieth unit of thirty-minute groups.

+
+
EXAMPLE 3 +

'2G2DT6HU', the second unit of two-day groups.

+
+
EXAMPLE 4 +

'2018-02-GP14D2I' and '2018Y02MGP14D2ID' are complete date representations that indicates "the second fortnight of February 2018", as specified by the rule "group every 14 days, second group".

+
+
EXAMPLE 5 +

'2018-03-GP10D3I' and '2018Y03MGP10D3ID' are complete date representations that indicates "the third 10-day block of March in 2018", as specified by the rule "group every 10 days, third group". A 10-day block is a time grouping commonly used in East Asia.

+
+
EXAMPLE 6 +

’16:GPT15M1I:00’ and 'T16HGPT15M1I0S' are complete time representations that indicates "the first quarter-hour of 16:00", as specified by the rule "group every 15 minutes, first group".

+
+
EXAMPLE 7 +

'2018-GP6M1I' and '2018YGP6M1IM' are date expressions (implied and explicit formats, respectively) of monthly precision that indicates "the first half of 2018", as specified by the rule "group every 6 months, first group", and therefore the grouping is specified in the [month] field. The resulting time interval is equivalent to the time interval expression '2018-01-01/2018-06-30'.

+
+

5.4. Application within representations

5.4.1. General

Grouped time scale units can be applied to date and time representations as +replacements for any time scale unit components as +long as the resulting expression is a valid one.

+
EXAMPLE 1 +

2018Y3G60DU6D is a valid date expression that refers to the date +year 2018, ordinal day of year 186 (which is July 5th).

+
+
EXAMPLE 2 +

2018Y9M2DT2GT8HU0H30M is a valid date and time expression that +refers to the date year 2018, September 2nd, 16:30.

+
+

5.4.2. Use of grouped units

Date and time representations can incorporate the grouped +time scale units by applying rules from Clause 5.2 +and Clause 5.3 to a date and time representation +described by this document and ISO 8601-1:--, by +replacing a time scale unit component in the representations +with [group].

+

The following representation is used for date and time +representations (complete representation, reduced precision) +that incorporate grouped time scale units. This +representation is denoted as [groupDateTime] in this document.

+

[higher-order-units][group][lower-units]

+

Where,

+
    +
  • +

    [higher-order-units] contains time scale units (and their +values) that are of higher order compared to the highest order time +scale unit within the group unit;

    +
  • +
  • +

    [lower-order-units] is optional, it contains time scale +units (and their values) that are of equal or lower order compared to +the lowest order time scale unit within the group unit.

    +
  • +
+
EXAMPLE 1 +

[monthE][group][yearE] is an invalid date and time representation +as [monthE] has a lower order than that of [yearE].

+
+

When [lower-order-units] is omitted, the expression refers +to a unit of the grouped time scale unit.

+
EXAMPLE 2 +

[centE][group] is a valid date and time representation, +expressing in units of the grouped time scale unit.

+
+
EXAMPLE 3 +

'2018Y1G60DU' represents the first 60-day group of the +year 2018.

+
+
EXAMPLE 4 +

'2018Y2M2G14DU' refers to the second 14-day group +in February of year 2018, which is in effect referring to +"the second fortnight of February 2018".

+
+
EXAMPLE 5 +

'2018Y3M3G10DU' refers to the third 10-day block of March +in 2018. A 10-day block is a time grouping commonly used +in East Asia.

+
+
EXAMPLE 6 +

'T16H1GT15MU' refers to the first quarter-hour of 16:00.

+
+

When [lower-order-units] is present, the expression refers +to a date and time using the lowest time scale unit in the +[lower-order-units] expression.

+

Time scale components placed to the right of a grouped +time scale unit behaves identically to those after a typical +time scale component, such that the component to the right +refers to an instance or time interval "within" the +component at the left.

+
EXAMPLE 7 +

[yearE][group][dayE] is a valid date and time representation, +expressing in the calendar day time scale unit. The [dayE] +points to a calendar day within the expression [yearE][group].

+
+
EXAMPLE 8 +

[decE][group][timeE] is a valid date and time representation, +expressing in the lowest order time scale units specified in +[timeE], which is the clock second time scale unit. The [timeE] +points to a clock time within the expression [decE][group].

+
+
EXAMPLE 9 +

'2018Y3G60DU6D' represents the sixth day of the third +60-day group of the year 2018.

+
+
EXAMPLE 10 +

'2018Y20GT12HU3H' represents the third hour within the +twentieth 12-hour group of the year 2018.

+
+

5.4.3. Adherence to grouped unit boundaries

Time scale unit values provided in [lower-order-units] must +not fall outside of the value bounds set by the group time scale unit +(the [group] expression).

+
EXAMPLE 1 +

'2018Y1G2MU30D' refers to the thirtieth day of the first +two-month group in year 2018. Since the first two-month group +of 2018 contains 59 days, the subsequent expression 30D falls +within the same grouped time scale unit.

+
+
EXAMPLE 2 +

'2018Y1G2MU60D' refers to the sixtieth day of the first +two-month group in year 2018. It is an invalid expression +as the first two-month group of 2018 only contains 59 days, +the expression 60D falls outside of the same grouped +time scale unit.

+
+

5.4.4. Representation with time shift

A representation using grouped time scale units can be represented +with a time shift as:

+

[groupDateTime][shiftE]

+
EXAMPLE 1 +

'2018Y1G60DUZ-5H', the first 60-day group of the year 2018, +five hours behind UTC.

+
+
EXAMPLE 2 +

'2018Y3G60DU6DZ8H' represents the sixth day of the third +60-day group of the year 2018, eight hours ahead of UTC.

+
+

5.4.5. Conversion to basic time scale units

5.4.5.1. General

When an expression referring to a grouped time scale +unit has to be converted to use basic time scale units +(time scale units that are defined in Clause 4), +it can be converted into a time interval.

+
EXAMPLE +

'2018Y1G6MU' refers to the first 6-month group of year 2018. +The resulting time interval is equivalent to that of the time interval +expression '2018Y1M/2018Y6M'.

+
+

5.4.5.2. Truncation of partial units

When the duration of a grouped time scale unit does not cleanly +divide the original time scale component, the duration of +the last unit of the grouped time scale is only partially +located within the boundaries specified by the original time scale component.

+

In this case, the particular grouped time scale unit refers only +to the duration that is within bounds of the original time +scale component. The remaining duration that are out +of bounds shall be truncated.

+
EXAMPLE +

2018Y9M4G8DU refers to the +"fourth 8-day grouping of September of year 2018", +but the fourth grouped unit only has 6 days within September +and 2 days in October. According to the truncation rule, only +the first 6 days belong to this grouped unit, and the resulting +time interval is 2018-09-25/2018-09-30.

+
+

5.4.5.3. Spanning grouped unit boundaries

In order to express a time interval covered by the grouped +unit without regard to the boundaries of the original time component, +the same expression can be provided using time interval representation.

+
EXAMPLE +

2018Y9M4G8DU, "fourth 8-day grouping of September of year 2018", +the start date of the fourth grouped unit can be found as 2018Y9M25D. +Therefore, the expression of 2018Y9M25D/P8D provides the full 8-day +duration of the unit, in the interval 2018Y9M25D/2018Y10M2.

+
+
+
+

6.  Explicit representations

+

6.1. General

+ +

This section provides date and time representations using explicit form.

+
+

6.2. Date

6.2.1. General

+ +

The representations provided in this clause are collectively denoted as [dateE].

+
+

6.2.2. Calendar date

The complete representation of a calendar date shall be as follows.

+

[yearE][monthE][dayE]

+
EXAMPLE +

'1985Y4M12D', calendar year 1985, April 12th.

+
+

6.2.3. Ordinal date

A complete representation of an ordinal date shall be as follows.

+

[yearE][dayoE]

+
EXAMPLE +

'1985Y102O', calendar year 1985, ordinal day 102 of year.

+
+

6.2.4. Week date

A complete representation of a week date shall be as follows.

+

[yearE][weekE][daykE]

+
EXAMPLE +

'1985Y15W5K', calendar year 1985, Friday of the calendar week 15.

+
+

6.3. Time of day

6.3.1. Local time of day

Representations of local time of day as defined below make no +provisions to prevent ambiguities in expressions that result from +discontinuities in the local time scale (e.g. daylight-saving time). +When the need arises to prevent these ambiguities, the representations +provided in Clause 6.6 may serve useful.

+

A complete representation of local time of day shall be as follows. +This representation shall be denoted as [timeE].

+

["T"][hourE][minE][secE]

+
EXAMPLE +

'T23H20M50S', a local time of day expression describing the fiftieth +seconds of the twentieth minute of the twenty-third clock hour.

+
+

6.3.2. Beginning of the day

The complete representation of beginning of day in explicit form shall +be as follows.

+

T0H0M0S

+

Applying the rule of omitting zero-valued time scale components, it can also +be represented as:

+

T0S

+

There is no representation of end of day to prevent ambiguity of the +overlapping end of day and the beginning of the next day.

+

6.4. Time shift

A time shift is used to represent the shift of local standard time +against UTC.

+

The complete representation of time shift in explicit form is represented +as follows, and is denoted as [shiftE] within this document.

+

["Z"][!]["-"][timeE]

+

Where,

+
    +
  • +

    ["Z"] is the time shift designator;

    +
  • +
  • +

    the leading minus sign (["-"]) is only applied when the time shift +expressed is behind UTC, it shall be omitted if the time shift is +ahead of or equal to UTC;

    +
  • +
  • +

    the expression [timeE] indicates the actual time shift from UTC.

    +
  • +
+

In accordance with Clause 6.10, zero-valued +time scale components may be omitted in [timeE].

+
EXAMPLE 1 +

'Z-5H', the time shift is 5 hours behind UTC.

+
+
EXAMPLE 2 +

'Z8H', the time shift is 8 hours ahead of UTC.

+
+
EXAMPLE 3 +

'Z6H0M', the time shift is six hours ahead of UTC; the expression '0M' may be omitted +in accordance with Clause 6.10.

+
+
EXAMPLE 4 +

'Z8H30M10S', the time shift is eight hours, thirty minutes and ten seconds ahead of UTC.

+
+

A single ["Z"] with the [timeE] portion empty, in accordance with the +rules specified in Clause 6.10, indicates that the +time shift from UTC of day is zero, and is functionally equivalent to +the representation 'Z0H0M'.

+

["Z"]

+
EXAMPLE 5 +

'Z', UTC where the time shift is zero.

+
+
EXAMPLE 6 +

'Z0H0M', UTC where the time shift is zero.

+
+

6.5. Date with shift

The complete representation for date with a time shift is as follows.

+

[dateE][shiftE]

+
EXAMPLE +

'1985Y4M12DZ-5H', calendar year 1985, April 12th with a time shift of 5 hours behind UTC.

+
+

6.6. Time of day with time shift

The complete representation for time of day with a time shift is as follows.

+

[timeE][shiftE]

+
EXAMPLE 1 +

'T23H20M50SZ', 23:20:50 at UTC of day.

+
+
EXAMPLE 2 +

'T23H20M50SZ-5H0M', 23:20:50 at local time, which is 5 hours behind UTC.

+
+
EXAMPLE 3 +

'T23H20M50SZ8H', 23:20:50 at local time, which is 8 hours ahead of UTC.

+
+

6.7. Date and time of day

A time can be expressed by combining a date expression (Clause 6.2) +with a time of day expression (Clause 6.3).

+

The date part of a date and time expression must be complete. The time +may be incomplete (Clause 6.13).

+

The representations provided in this clause are collectively denoted as +[datetimeE].

+

6.7.1. Date and time only

The complete representation for date and time only is as follows.

+

[dateE][timeE]

+
EXAMPLE +

'1985Y4M12DT23H20M30S', calendar year 1985, April 12th, 23:20:30.

+
+

6.7.2. Date and time with shift

The complete representation for date with time and a time shift is as follows.

+

[dateE][timeE][shiftE]

+
EXAMPLE +

'1985Y4M12DT23H20M30SZ8H', calendar year 1985, April 12th, 23:20:30, 8 hours ahead of UTC.

+
+

6.8. Decade

The complete representation for decade is as follows.

+

[decE]

+
EXAMPLE +

'1880', the decade 1880s, spanning years from 1880 to 1889.

+
+

6.9. Century

The complete representation for century is as follows.

+

[centE]

+
EXAMPLE +

'1300', the century 1300s, spanning years from 1300 to 1399.

+
+

6.10. Omission of zero valued components

Time scale components within an explicit form that has a value of 0 may be omitted entirely with its corresponding designator, except when the omission of it affects the indication of precision.

+

In the representations given in this clause, if a time scale component of a higher order (compared to the lowest order component specified in the representation) is omitted, it is assumed to have the value "0" as long as the time scale component accepts the value "0" (ISO 8601-1:--, Clause 4.3).

+
EXAMPLE 1 +

'1985Y4M15DT15H0M10S' and '1985Y4M15DT15H10S' can be both used to express +the time 3:00:10 p.m. on April 15th, 1985 in the Gregorian calendar.

+
+
EXAMPLE 2 +

'1988Y3M1DT2H0M0S' and '1988Y3M1DT2H' are unequal representations where the former expression has seconds precision, and the latter expression has hour precision.

+
+
EXAMPLE 3 +

'2018Y8M8DT30M0SZ': indicates the date 8th August 2018 at time 00:30:00 in UTC time of day Since the "hour" component is omitted and "seconds" included, the hour is assumed to be zero, and the expression has seconds precision. This is equivalent to the expression '2018Y08M08DT30M0SZ' in which zero padding is applied to calendar month and calendar day.

+
+

6.11. Indication of precision

The lowest denoted time scale component in a date and time representation +indicates the precision level of the representation.

+
EXAMPLE 1 +

'1985Y4M' has calendar month precision.

+
+
EXAMPLE 2 +

'1985Y4M12DT2H' has clock hour precision.

+
+
EXAMPLE 3 +

'1985Y4M12DT30M' has clock minute precision, where the clock hour time +scale component is a zero-valued omission.

+
+

6.12. Decimal fractions for time

A decimal fraction of hour, minute or second may be included in an expression in accordance with ISO 8601-1:--, Clause 5.2.1.4.

+
EXAMPLE 1 +

'2018Y8M8DT0,5H': indicates the date 8th August 2018 at time 00:30 with minutes precision.

+
+
EXAMPLE 2 +

'2018Y8M8DT10H30.5M': indicates the date 8th August 2018 at time 10:30:30 with seconds precision.

+
+
EXAMPLE 3 +

'2018Y8M8DT10H30M15,3S': indicates the date 8th August 2018 at time 10:30:15 plus 300ms with sub-second precision.

+
+

6.13. Representations other than complete

Any of the representations given in this clause may be modified for reduced precision +(Clause 6.11) and decimal representation (Clause 6.12).

+
EXAMPLE 1 +

'2018Y8M': indicates the date August 2018 with calendar month precision.

+
+
EXAMPLE 2 +

'2018Y8M8DT30M': indicates the date 8th August 2018 at time 00:30 with minute precision. Since the "hour" component is omitted, it is assumed to be zero because it is of a higher order than the lowest order component specified in the representation (here, "minutes). The omitted "`second" component does not form part of the representation because it is of a lower order than the lowest order component.

+
+

6.14. Time interval

6.14.1. General

A time interval shall be expressed by a start and an end date. +A solidus ["/"] is used as a separator to separate the two start and +end dates.

+

The complete representation of a time interval is defined as follows.

+

[datetimeE]["/"][datetimeE]

+
EXAMPLE +

'1985Y4M12DT23H20M50S/1985Y6M25DT10H30M0S', time interval beginning at +20 minutes and 50 seconds past 23 hours on 12 April 1985 local time of +day and ending at 30 minutes past 10 hours on 25 June 1985 local time +of day.

+
+

6.14.2. Duration substitution

Providing a duration as an alternative to either a start or end date is +acceptable, given the start and end dates can be inferred from the given +duration of the time interval.

+
EXAMPLE 1 +

'1985Y4M12DT23H20M50S/P3D'

+
+
EXAMPLE 2 +

'P3D/1985Y4M12DT23H20M50S'

+
+

6.14.3. Time scale component order

For expression of a time interval by a start and an end, higher order +time scale components may be omitted from the "end of time interval", +provided that the resulting expression is unambiguous. In this case the +omitted higher order components from the "start of time interval" +expression apply.

+
EXAMPLE +

'2018Y1M15D/2M20D' represents '2018Y1M15D/2018Y2M20D' as the expression +'2M20D' unambiguously refers to the calendar month and calendar day +components, and the higher order components can be inherited from the +start date expression.

+
+

6.14.4. Time shift indication

Representations for time zones and UTC included with the component +preceding the separator shall be assumed to apply to the component +following the separator, unless a corresponding alternative is included.

+
EXAMPLE +

'2018Y1M15DZ5Y0M/2018Y2M20D' is equivalent to +'2018Y1M15DZ5Y0M/2018Y2M20DZ5Y0M' as the 'Z5H0M' time shift also +applies to the expression after the separator.

+
+
+
+

7.  Explicit duration

+

7.1. General

Duration can be expressed by a combination of time scale units +in explicit form — years, months, weeks, days, hours, minutes, and seconds.

+

These time scale components are specified in +Clause 4, and are used to specify +positive duration.

+

7.2. Durational units

Time scale unit components are used to compose a duration expression, +and are defined as "durational units".

+

The following time scale components can be combined +to form a representation denoted as [durationUnits] +for the expression of duration.

+

[yearE][monthE][weekE][dayE]["T"][hourE][minuteE][secondE]

+

Where,

+
    +
  • +

    each time scale component acting as a durational unit +(such as [monthE]) may be omitted;

    +
  • +
  • +

    the time designator symbol ["T"] is used to separate +the time scale components relating to the clock from those of +the calendar.

    +
  • +
+

Within [durationUnits], time scale components of higher order +shall be expressed before those of lower order.

+

7.3. Representations

7.3.1. General

+ +

The following representations are both considered complete +representations of duration.

+
+

7.3.2. Composite representation

The composite representation of a duration, fully accepting +expressions of the duration representation given in +ISO 8601-1:--, Clause 5.2.3, is given as follows.

+

[!]["-"]["P"][durationUnits]

+

Where,

+
    +
  • +

    [durationUnits] contains time scale components for expressing +positive duration.

    +
  • +
+
EXAMPLE 1 +

'P3D', duration of three days.

+
+
EXAMPLE 2 +

'P3W2D', duration of three weeks and two days, which is 23 days, as +equivalent to the expression of 'P23D'.

+
+
EXAMPLE 3 +

'P180Y800D', duration of one-hundred-and-eighty years and eight-hundred days.

+
+

NOTE  The exact duration for some time scale components can only be +known when placed on the actual time scale.

+

7.3.3. Precedence representation

The precedence representation of a duration is used for specifying +author intent in the evaluation order of time scale components within +a duration.

+

The representation of calendar duration time scale components +(denoted as [calendarD]) is provided as follows.

+

["P"][calendarDU]

+

Where,

+
    +
  • +

    [calendarDU] is one of [yearE], [monthE], [weekE], [dayE].

    +
  • +
+
EXAMPLE 1 +

P3D describes a duration of three days, in accordance with [calendarD].

+
+

The representation of clock duration time scale components +(denoted as [clockD]) is provided as follows.

+

["P"]["T"][clockDU]

+

Where,

+
    +
  • +

    [clockDU] is one of [hourE], [minuteE], [secondE].

    +
  • +
+
EXAMPLE 2 +

PT8H describes a duration of eight hours, in accordance with [clockD].

+
+

The duration precedence representation is described as follows, +denoted as [durationP].

+

[!]["-"][durC-1][durC-2]...[durC-n]

+

Where,

+
    +
  • +

    [durC-i] is either [calendarD] or [clockD];

    +
  • +
  • +

    the order of the [durC-i] components is used to determine the +evaluation precedence order of the duration statement [durationP].

    +
  • +
+
EXAMPLE 3 +

P1YP3MP2D describes a duration of one year, three months +and two days, to be evaluated in the order as described.

+
+
EXAMPLE 4 +

P2DP3MP1Y describes a duration of two days, three months +and one year, to be evaluated in the order as described.

+
+
EXAMPLE 5 +

PT10HP2DP3MP1Y describes a duration of ten hours, two days, three months +and one year, to be evaluated in the order as described.

+
+

7.4. Negative duration

A duration with a negative value represents a duration in the reverse +direction of the proceeding time scale.

+
EXAMPLE 1 +

-P20Y3M describes a negative duration of twenty years and three months ago.

+
+
EXAMPLE 2 +

-P2DP3MP1Y describes a negative duration of two days, three months +and one year, to be evaluated in the order as described.

+
+

7.5. Fractional duration

+ +

A duration representation can be modified to accept a fractional value +in place of any [i] specified in a durational time scale component.

+
+

7.6. Exact duration

7.6.1. General

+ +

This clause describes methods to resolve exact duration in +face of ambiguities.

+
+

7.6.2. Context-dependent duration

The exact duration of some time scale units can only be known +when placed on the actual time scale.

+
EXAMPLE 1 +

'P1Y' duration could be 365 or 366 calendar days depending on +whether the year is a leap year.

+
+
EXAMPLE 2 +

'P3M' duration could be 90, 91, 92 days depending on the actual +calendar months and calendar year.

+
+
EXAMPLE 3 +

'PT1M' duration is normally 60 seconds, but when the minute is the +last minute of the year, it could be 59, 60 or 61 seconds long +depending on whether a leap second is applied.

+
+
EXAMPLE 4 +

'P1Y2M15DT12H30M', duration of 1 year, 2 months, 15 days, 12 hours +and 30 minutes. The actual duration of the involved calendar months can +only be known when the duration is placed on an actual start date.

+
+

7.6.3. Speculative duration

The exact duration of certain time scale unit may only be known +after an event occurs.

+

There is no universal rule to calculate leap seconds in advance, since +the decision to insert a leap second is driven by a number of dynamic +factors and only known when announced by the BIPM.

+

Specifically, the exact duration of the last clock minute of a +calendar year can only be known after it is announced by the BIPM, +whether a leap second has or will occur (in UTC). +This event is described in this document to occur at the +"leap second horizon date" for a calendar year.

+

The exact duration of the last clock minute in a calendar year +is one of the following duration:

+
    +
  • +

    when there is a positive leap second, 61 clock seconds;

    +
  • +
  • +

    when there is no leap second, 60 clock seconds; and

    +
  • +
  • +

    when there is a negative leap second, 59 clock seconds.

    +
  • +
+

For the accuracy of general purposes, it is acceptable to assume +the last clock minute always contains 60 clock seconds, just like +any other clock minute.

+

For cases where durational accuracy at the clock second level is +of importance, the following steps shall be taken:

+
    +
  • +

    When calculating exact duration prior to the leap second horizon +date of a specific calendar year involved, the last clock +minute is assumed to have no leap second, such that 59 is always +the last second of the year;

    +
  • +
  • +

    When calculating exact duration after the leap second horizon +date of a specific calendar year involved, the last clock +minute shall reflect the actual duration.

    +
  • +
+
EXAMPLE 1 +

'P3000Y12M31DT23H59M' is considered to have a duration of 60 clock seconds, +as the calendar year 3000’s leap second horizon date has not yet +occurred.

+
+
EXAMPLE 2 +

'P2016Y12M31DT23H59M' is considered to have a duration of 61 clock seconds, +since the leap second horizon date has already occurred, and it is known +that a positive leap second assigned to the calendar year 2016.

+
+
+
+

8.  Evaluation of date and time with duration

+

8.1. General

A date and time representation is modified by a duration +in many cases, including the calculation for:

+
    +
  • +

    time intervals when given duration as a start or end;

    +
  • +
  • +

    boundaries of grouped time scale units (Clause 5);

    +
  • +
  • +

    conversion between of UTC of day and local time of day via time shifts; and

    +
  • +
  • +

    occurrences of recurring time intervals.

    +
  • +
+

This clause provides methods to calculate a consistent result +date and time, given an origin date and time ("origin") +and a duration time scale component (duration) to apply.

+

Modification of a date and time representation with +a duration is described using the following representation, +called a "date time formula".

+

resolve(date, duration)

+

or

+

date + duration

+
EXAMPLE +

2018Y9M10D + P1D is a date time formula.

+
+

8.2. Prerequisite mechanisms

8.2.1. Carry-over of overflow in time scale components

An "overflow" of a date and time expression is defined as assigning a +value exceeding the maximum value accepted by the time scale component.

+
EXAMPLE 1 +

An increase of P1M (duration) to 2018Y12M (date) will result in the expression +2018Y13M, where the month component is overflowed with value 13.

+
+

An overflow is considered resolved once the overflowed time scale unit +has transferred its excess to the immediate higher order time scale +component.

+
EXAMPLE 2 +

The overflowed expression 2018Y13M can be resolved to 2019Y1M.

+
+

An overflow can cause multiple carry-overs when the overflow not only +causes the immediate higher order time scale component to overflow, but +also subsequent higher order components.

+
EXAMPLE 3 +

The overflowed expression 2018Y12M366D can be resolved to 2018Y24M1D +(which still contains an overflow), which can be resolved to +2019Y12M1D (where there is no more overflow).

+
+

8.2.2. Truncation at time scale component boundaries

A modification made to a higher order time scale component may +cause the value of a lower order time scale component to go beyond +its value boundaries. This condition is described as +"out of bounds" of a date and time expression.

+

This situation occurs when a modification is made to the values of +certain time scale components, because a lower order component +always has its maximum value bound by its immediate higher order +component:

+
    +
  • +

    clock minute (clock second value of 60 is only valid for a leap +second);

    +
  • +
  • +

    calendar month (calendar day values 29, 30, 31 are invalid for +some months); and

    +
  • +
  • +

    calendar year (ordinal day value of 366 and calendar month/day +combination of February 29th is only valid for a leap year).

    +
  • +
+
EXAMPLE 1 +

An increase of P1M (duration) to 2018Y1M31D (date) will result in +the expression 2018Y2M31D, which is an invalid date representation +as the calendar day value of 31 has exceeded the boundary of its +immediate higher order component, the month 2 (February).

+
+
EXAMPLE 2 +

An increase of P1Y (duration) to 2016Y12M31DT23H59M60S (date) will result in +the expression 2017Y12M31DT23H59M60S, which is an invalid date representation +as the clock second value of 60 has exceeded the boundary of its +immediate higher order component, the clock minute with its last second +at 59.

+
+

An out of bounds situation is considered resolved once the excess +value is truncated at the violating (lower order) time scale component.

+
EXAMPLE 3 +

The out of bounds expression 2019Y2M29D`" can be truncated to `2019Y2M28D.

+
+
EXAMPLE 4 +

The out of bounds expression 2020Y366O`" can be truncated to `2020Y365O.

+
+

8.3. Simple duration

A simple duration is a duration expression with only +a single time scale component.

+

Evaluation of a date time formula that contains a simple duration +is to directly apply the durational unit to the corresponding +time scale component of the date and time representation +and applying carry-over.

+

The steps are as follows:

+
    +
  1. +

    Take the value of the time scale component in the simple duration, +directly modify the value of the corresponding time scale component +in the date and time representation.

    +
  2. +
  3. +

    In the resulting date and time representation, start from the +lowest order overflowed time scale component, perform carry-over +until there is no more overflow in the representation.

    +
  4. +
  5. +

    If any time scale components have become invalid, apply +truncation to them.

    +
  6. +
  7. +

    The resulting date and time representation is complete.

    +
  8. +
+
EXAMPLE

Calculation of 2022Y2M28D + P3D:

+
    +
  1. +

    Direct modification of date and time representation, obtains 2022Y2M31D.

    +
  2. +
  3. +

    Apply carry-over to overflowed components, obtains 2022Y3M02D.

    +
  4. +
+

8.4. Composite duration

The method of evaluating of a date time formula with a +composite duration (Clause 7.3.2) is to directly +apply the durational units to the date and time representation +without truncation, and only applying carry-over at the end.

+

The steps are as follows:

+
    +
  1. +

    For all values of time scale components in the composite duration, +directly modify the values of the corresponding time scale components +in the date and time representation.

    +
  2. +
  3. +

    In the resulting date and time representation, start from the +lowest order overflowed time scale component, perform carry-over +on all overflowed time scale components, until there is no more +overflow in the representation.

    +
  4. +
  5. +

    If any time scale components have become invalid, apply +truncation to them.

    +
  6. +
  7. +

    The resulting date and time representation is complete.

    +
  8. +
+
EXAMPLE

Calculation of 2022Y2M30D + P1Y3M2D:

+
    +
  1. +

    Direct modification of date and time representation, obtains 2023Y5M32D.

    +
  2. +
  3. +

    Apply carry-over to overflowed components, obtains 2023Y6M31D.

    +
  4. +
  5. +

    The resulting representation is 2023Y6M31D.

    +
  6. +
+

8.5. Precedence duration

The method of evaluating of a date time formula with a +precedence duration (Clause 7.3.3) is to apply the +durational units one by one to the date and time representation +with truncation and carry-over at every step.

+

The steps are as follows:

+
    +
  1. +

    Starting at the left side of the precedence duration expression, +process every durational unit one by one as follows:

    +
      +
    1. +

      Use the durational unit (which only contains one time scale +component), to modify the corresponding time scale component (the "target component") +in the date and time representation.

      +
    2. +
    3. +

      If the target component has overflowed in the previous step, +perform carry-over (to higher order time scale components), +until there is no more overflow in the representation.

      +
    4. +
    5. +

      If any time scale components of lower order than the +target component have become invalid, apply truncation +to them.

      +
    6. +
    +
  2. +
  3. +

    Once all durational units have been processed, the +resulting date and time representation is complete.

    +
  4. +
+
EXAMPLE 1

Calculation of 2022Y2M29D + P1YP3MP2D:

+
    +
  1. +

    Process the first durational unit: (2022Y2M29D + P1Y) + P3MP2D.

    +
  2. +
  3. +

    Apply the first durational unit to the date and time representation: +2023Y2M29D + P3MP2D.

    +
  4. +
  5. +

    No carry-over is necessary since there is no overflow.

    +
  6. +
  7. +

    Since 29D is of lower order than the target component (calendar +year), the representation is truncated: 2023Y2M28D + P3MP2D.

    +
  8. +
  9. +

    Process the second durational unit: (2023Y2M28D + P3M) + P2D.

    +
  10. +
  11. +

    Apply the second durational unit to the date and time representation: +2023Y5M28D + P2D.

    +
  12. +
  13. +

    No carry-over is necessary since there is no overflow.

    +
  14. +
  15. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  16. +
  17. +

    Process the third durational unit: 2023Y5M28D + P2D.

    +
  18. +
  19. +

    Apply the third durational unit to the date and time representation: +2023Y5M31D.

    +
  20. +
  21. +

    No carry-over is necessary since there is no overflow.

    +
  22. +
  23. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  24. +
  25. +

    The resulting date and time representation is 2023Y5M31D.

    +
  26. +
+
EXAMPLE 2

Calculation of 2022Y2M29D + P2DP3MP1Y:

+
    +
  1. +

    Process the first durational unit: (2022Y2M29D + P2D) + P3MP1Y.

    +
  2. +
  3. +

    Apply the first durational unit to the date and time representation: +2022Y2M31D + P3MP1Y.

    +
  4. +
  5. +

    Carry-over is necessary since there is the target component has overflowed: +2022Y3M2D + P3MP1Y.

    +
  6. +
  7. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  8. +
  9. +

    Process the second durational unit: (2022Y3M2D + P3M) + P1Y.

    +
  10. +
  11. +

    Apply the second durational unit to the date and time representation: +2022Y6M2D + P1Y.

    +
  12. +
  13. +

    No carry-over is necessary since there is no overflow.

    +
  14. +
  15. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  16. +
  17. +

    Process the third durational unit: 2022Y6M2D + P1Y.

    +
  18. +
  19. +

    Apply the third durational unit to the date and time representation: +2023Y6M2D.

    +
  20. +
  21. +

    No carry-over is necessary since there is no overflow.

    +
  22. +
  23. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  24. +
  25. +

    The resulting date and time representation is P1Y.

    +
  26. +
+

8.6. Involving fractional duration

When fractional duration (Clause 7.5) is applied +to context-dependent durational units (Clause 7.6.2), +it is necessary to resolve the fractional duration in context.

+
EXAMPLE 1 +

The expression P0.5M ("half a month") is ambiguous because +the exact duration of a calendar month depends on its context, +and that the context for which P0.5M is anchored to is unclear.

+
+

The duration of a fractional, context-dependent, durational unit +can be obtained by first calculating a single unit of the durational +unit in context, such that, the exact duration for the durational +unit in whole (e.g. "P1M") becomes known. Once the exact duration +of a single unit is known, the duration of the fractional unit can +be calculated.

+

date + frac-dur =
  duration(date + unit(frac-dur), date) × value(frac-dur) + date

+

Where,

+
    +
  • +

    unit(frac-dur) is the value of a single unit used in the duration frac-dur;

    +
  • +
  • +

    value(frac-dur) is the fractional value used with the duration frac-dur;

    +
  • +
  • +

    duration(date1, date2) is a function to calculate the duration between two dates or times, +such as Clause 8.4 or Clause 8.5.

    +
  • +
+

Given that "date + unit(frac-dur)" can be calculated, this +method always produces a consistent value.

+
EXAMPLE 2

Given the expression: 2018-01-23 + P0.5M:

+
    +
  1. +

    It is rephrased as duration(2018-01-23 + P1M, 2018-01-23) × 0.5 + 2018-01-23.

    +
  2. +
  3. +

    It is reduced to duration(2018-02-23, 2018-01-23).

    +
  4. +
  5. +

    Then P31D × 0.5 + 2018-01-23.

    +
  6. +
  7. +

    Then P15.5D + 2018-01-23.

    +
  8. +
  9. +

    Since P15.5D is an exact duration (duration of calendar day is +known), P15.5D + 2018-01-23`" is resolvable and gives the final result`2018-02-07T12:00:00.

    +
  10. +
+

8.7. Involving speculative duration

As described in Clause 7.6.3, there is no universal +rule to calculate leap seconds in advance, since the decision +to insert a leap second is driven by a number of dynamic +factors and only known when announced by the BIPM.

+

The rules specified in Clause 7.6.3 are used +to evaluate a date time formula that involves leap seconds.

+
EXAMPLE 1

This example applies identically with or without a leap second. Given the expression: 2018-12-31T23:59:59 + PT1M:

+
    +
  1. +

    Apply the durational unit clock minute directly to the representation: 2018-12-31T23:60:59

    +
  2. +
  3. +

    Since 59 is the last clock minute, treat the overflow with carry-over: 2018-12-31T24:00:59

    +
  4. +
  5. +

    Since 23 is the last clock hour, treat the overflow with carry-over: 2018-12-32T00:00:59

    +
  6. +
  7. +

    Since 31 is the last calendar day of year, treat the overflow with carry-over: 2018-13-01T00:00:59

    +
  8. +
  9. +

    Since 13 is the last calendar month, treat the overflow with carry-over: 2019-01-01T00:00:59

    +
  10. +
  11. +

    The resulting expression is 2019-01-01T00:00:59.

    +
  12. +
+
EXAMPLE 2

Given the expression containing a leap second: 2016-12-31T23:59:60 + PT1M:

+
    +
  1. +

    Apply the durational unit clock minute directly to the representation: 2016-12-31T23:60:60

    +
  2. +
  3. +

    Since 59 is the last clock minute, treat the overflow with carry-over: 2016-12-31T24:00:60

    +
  4. +
  5. +

    Since 23 is the last clock hour, treat the overflow with carry-over: 2016-12-32T00:00:60

    +
  6. +
  7. +

    Since 31 is the last calendar day of year, treat the overflow with carry-over: 2016-13-01T00:00:60

    +
  8. +
  9. +

    Since 13 is the last calendar month, treat the overflow with carry-over: 2017-01-01T00:00:60

    +
  10. +
  11. +

    The clock second 60 is out of bounds, it is truncated to the maximum value: 2017-01-01T00:00:59

    +
  12. +
  13. +

    The resulting expression is 2017-01-01T00:00:59.

    +
  14. +
+
EXAMPLE 3

Given the expression containing a leap second: 2016-12-31T23:59:59 + PT1S:

+
    +
  1. +

    Apply the durational unit clock second directly to the representation: 2016-12-31T23:59:60

    +
  2. +
  3. +

    The resulting expression is 2016-12-31T23:59:60.

    +
  4. +
+
+
+
+

Bibliography

+

[1]  ISO/IEC 646, Information technology — ISO 7-bit coded character set for information interchange

+

[2]  ISO 8601:2004, Data elements and interchange formats — Information interchange — Representation of dates and times

+

[3]  ISO 8601-2:--, Date and time — Representation for information interchange — Part 2: Extensions

+
+
+ + + + + + + + + + + + diff --git a/csd-datetime-explicit.pdf b/csd-datetime-explicit.pdf new file mode 100644 index 0000000..aab7644 Binary files /dev/null and b/csd-datetime-explicit.pdf differ diff --git a/csd-datetime-explicit.xml b/csd-datetime-explicit.xml new file mode 100644 index 0000000..334b7aa --- /dev/null +++ b/csd-datetime-explicit.xml @@ -0,0 +1,1751 @@ + + + + Date and time — Explicit representation + CC/FDS 18011:2018 + 18011 + + 2018-09-10T00:00:00Z + + + + + CalConnect + + + + + + CalConnect + + + en + + final-draft + + 2018 + + + CalConnect + + + + + VCARD, CALENDAR + + + 1 + 2018-09-10T00:00:00Z + +Foreword

The Calendaring and Scheduling Consortium ("CalConnect") is global non-profit +organization with the aim to facilitate interoperability of technologies across +user-centric systems and applications.

+

CalConnect works closely with liaison partners including international +organizations such as ISO, OASIS and M3AAWG.

+

The procedures used to develop this document and those intended for its further +maintenance are described in the CalConnect Directives.

+

In particular the different approval criteria needed for the different types of +CalConnect documents should be noted. This document was drafted in accordance with the +editorial rules of the CalConnect Directives.

+

Attention is drawn to the possibility that some of the elements of this +document may be the subject of patent rights. CalConnect shall not be held responsible +for identifying any or all such patent rights. Details of any patent rights +identified during the development of the document will be in the Introduction +and/or on the CalConnect list of patent declarations received (see +www.calconnect.com/patents).

+

Any trade name used in this document is information given for the convenience +of users and does not constitute an endorsement.

+

This document was prepared by Technical Committee VCARD, CALENDAR.

Introduction

has been the international standard for date and time representations +and is applied widely, including in the and standards.

+

However, the representations provided in require +fixed-length digits for time scale components, such as the +4-digit year, does not accept negative values, and does not +allow omission of a time scale component that has a zero value.

+

This document extends the "duration" representation +defined in to fulfill the need of a flexible-length +representation, called the "explicit form".

+ +Scope

The purpose of this document is to provide:

+
    +
  • +

    a standard, declarative representation of date and time and time +scale components called the "explicit form";

    +
  • +
  • +

    a grouped time scale unit mechanism for grouping of date and time; +and

    +
  • +
  • +

    new duration representations and mechanics for the calculation of +date time formulas involving duration.

    +
  • +
+

This document only supports date elements from the Gregorian calendar and +times from the 24-hour clock.

+

Date and time format representations described in this document +utilizes numbers, alphabets and symbols defined in . +These representations are meant to be both human recognizable and +machine readable. Character encoding of the representations is +not covered in this document.

+ +Terms and definitionsTerms and definitions + explicit form +

date and time representation that uses designator symbols to delimit time scale components

+
+ + designator symbols +

characters used to denote units of a time scale component

+
+ + date time formula +

expression that specifies modification of a date and time expression (3.1.3.1) with a duration (3.1.1.8)

+
+ + durational unit +

time scale component (3.1.3.3) that compose the duration (3.1.1.8) date and time representation (3.1.3.2)

+
+ + grouped time scale unit +

time scale unit (3.1.1.7) composed of a duration (3.1.1.8) expressed by one or more durational units ()

+
+ + General +

Representations specified in this document make use of symbols given in and the following.

+
+ + Time scale component symbols +
+
c(feat)
+
+

the left side of representation statement where "c" is a time scale component (e.g. "year") and "feat" is a feature, for example, "m" for a time scale component that accepts negative values

+
+
yearE
+
+

time scale component calendar year in explicit form

+
+
monthE
+
+

time scale component calendar month in explicit form

+
+
weekE
+
+

time scale component calendar week of year in explicit form

+
+
dayE
+
+

time scale component calendar day of month in explicit form

+
+
daykE
+
+

time scale component calendar day of week in explicit form

+
+
dayoE
+
+

time scale component calendar day of year in explicit form

+
+
hourE
+
+

time scale component clock hour in explicit form

+
+
minE
+
+

time scale component clock minute in explicit form

+
+
secE
+
+

time scale component clock second in explicit form

+
+
decE
+
+

time scale component decade in explicit form

+
+
centE
+
+

time scale component century in explicit form

+
+
+
+ + Composite component symbols +
+
dateE
+
+

the composite time scale components for the complete representation of a date as determined in

+
+
timeE
+
+

the composite time scale components for the complete representation of a time of day as determined in

+
+
shiftE
+
+

the composite time scale component for time shift in basic form with hours and minutes, as determined in

+
+
durationE
+
+

the composite time scale units for the representation of a duration as determined in

+
+
+
+Symbols used in place of digits or signs

These symbols are used to represent characters in the date and time representations. They are used in representations only, and are replaced by one or more characters, as described, in expressions:

+
+
!
+
+

indicates that the token following this symbol is optional (may be omitted)

+
+
n
+
+

a positive integer or value, may be left absent to signify an unbounded value

+
+
i
+
+

a positive integer

+
+
negi
+
+

a positive or negative integer; equivalent to [!]["-"][i]

+
+
+Designator symbols

These symbols are used to represent designators in the date and time expressions:

+
+
"-"
+
+

a minus sign represented by the character "`-"` to indicate a negative value

+
+
"K"
+
+

the calendar day of week designator, represented by the character "K", preceding a data element which represents the ordinal number of a calendar day within a calendar week

+
+
"J"
+
+

the decade designator, represented by the character "J", preceding a data element which represents the number of decades

+
+
"Y"
+
+

the year designator, represented by the character "Y", preceding a data element which represents the number of years

+
+
"M"
+
+

the month or minute designator, represented by the character "M", preceding a data element which represents the number of months or minutes

+
+
"W"
+
+

the week designator, represented by the character "W", preceding a data element which represents the ordinal number of a calendar week within the calendar year

+
+
"O"
+
+

the calendar day of year designator, represented by the character "O", preceding a data element which represents the ordinal number of a calendar day within a calendar year

+
+
"D"
+
+

the day of month designator, represented by the character "D", preceding a data element which represents the number of days in a month

+
+
"H"
+
+

the hour designator, represented by the character "H", preceding a data element which represents the number of hours

+
+
"S"
+
+

the second designator, represented by the character "S", preceding a data element which represents the number of seconds

+
+
"T"
+
+

the time designator, represented by character "T", indicates:

+
    +
  • +

    the start of the representation of local time of day to designate local time of day expressions as such,

    +
  • +
  • +

    the start of the representation of the time of day in date and time of day expressions,

    +
  • +
  • +

    the start of the representation of the number of hours, minutes or seconds in expressions of duration

    +
  • +
+
+
"P"
+
+

the duration designator, represented by the character "P", preceding the component which represents the duration

+
+
"B"
+
+

the suffix designator to represent years before year one, represented by the character "B", placed after the time scale components of calendar year, decade and century.

+
+
"Z"
+
+

the UTC designator, represented by the character "Z", added to the end of a time representation to indicate that a time of day is represented as UTC of day.

+
+
"G"
+
+

the grouped time scale unit prefix designator, represented by the character "G", indicates a grouping calculation applies to the subsequent time scale components until encountering the corresponding suffix designator.

+
+
"U"
+
+

the grouped time scale unit suffix designator, represented by the character "U", indicates a grouping calculation applies to the preceding time scale components from the corresponding prefix designator.

+
+
"x"
+
+

the representation of any character "x" as according to the textual representation of "x" in the repertoire

+
+
+ + + +

Although "M" can be used to designate months or for minutes, its meaning is unambiguous in expressions because the time portion shall always be preceded by the time designator "T".

+
+

The designator symbol "J" is assigned from its ordinal position +being the tenth letter of the English alphabet.

+
+

The "G" and "U" designator symbols are used to demarcate the +"grouped time scale unit" time scale components as they form the +initial letters of the words "group" and "unit".

+
+Separator symbols

In date and time expressions and date and time representations, the following characters are used as separators.

+
+
"/" (solidus)
+
+

the "/" solidus character separates start and end times in the representation of a time interval, as well as the symbol 'R' from the remainder of a recurring time interval representation. A solidus may be replaced with a double hyphen ["--"] by mutual agreement of the communicating partners.

+
+
"." (period) and "," (comma)
+
+

the "." period and "," comma characters are decimal signs used to separate the integer part from the decimal fraction of a number.

+
+
+Time scale components and units + General +

Additional properties and the explicit forms of time scale units are +represented in this clause.

+
+Order of time scale units

This document refers to an "order" amongst time scale units, which is +defined by the duration of a time scale unit relative to other time +scale units. For example, since a single calendar month has a duration +always greater than a single unit of calendar day, the former is +considered of a higher order time scale unit than calendar day, and +therefore the latter is also considered of a lower order time scale +unit than the former.

+

The relative order of commonly used time scale units is specified +below, with the higher listed entry considered a higher order time +scale unit than a lower listed entry:

+
    +
  1. +

    calendar century

    +
  2. +
  3. +

    calendar decade

    +
  4. +
  5. +

    calendar year

    +
  6. +
  7. +

    calendar month

    +
  8. +
  9. +

    calendar week

    +
  10. +
  11. +

    calendar day

    +
  12. +
  13. +

    clock hour

    +
  14. +
  15. +

    clock minute

    +
  16. +
  17. +

    clock second

    +
  18. +
+ +

a higher order time scale does not necessarily mean its duration +can be expressed as an integer multiple of a lower order time scale, +for example, in the case of calendar month (28, 29, 30 or 31 days) +and calendar week (7 days).

+
+Explicit formsValue prefixing

Prefixing of the value with one or more "`0`"s (the number zero) to the +integer [i] is allowed in the explicit forms of time scale components.

+ +

'1M', '01M', and '0001M' all describe the calendar month January.

+
+Calendar year and years duration

The calendar year and years duration is represented as follows:

+[i]["Y"] + +

'12Y', duration, twelve years

+
+ +

'12Y', date, year 12.

+
+Calendar month and months duration

The calendar month and months duration is represented as follows:

+[i]["M"] + +

'6M', duration, 6 months.

+
+ +

'8M', date, the month of August.

+
+Calendar week of year and weeks duration

The calendar week of year number and weeks duration is represented as +follows:

+[i]["W"] + +

'10W', duration, ten weeks.

+
+ +

'22W', date, the twenty-second calendar week of a calendar year.

+
+Calendar day of month and days duration

The calendar day of month and days duration is represented as follows:

+[i]["D"] + +

'130D', duration, 130 days.

+
+ +

'25D', date, the twenty-fifth (25) calendar day of a calendar month.

+
+Calendar day of week

The calendar day of week is represented as the following time scale component:

+[i]["K"] +

Where,

+
    +
  • +

    [i] represents the ordinal day number in the calendar week; +valid values of [i] are the integers 1 to 7, representing Monday to Sunday, +in accordance with "The week calendar" specified in 4.2.2.

    +
  • +
+ +

'1K', calendar day of week Monday

+
+ +

'3K', calendar day of week Wednesday

+
+ +

'7K', calendar day of week Sunday

+
+Calendar day of year

The calendar day of year is represented as the following time scale component:

+[i]["O"] + +

'351O', ordinal day 351 of the calendar year

+
+Clock hour and hours duration

Clock hour and hours duration is represented as follows:

+[i]["H"] + +

'36H', duration, thirty-six hours.

+
+ +

'6H', time, the sixth clock hour.

+
+Clock minute and minutes duration

Clock minute and minutes duration is represented as follows:

+[i]["M"] + +

'72M', duration, 72 minutes.

+
+ +

'56M', time, the fifty-sixth clock minute.

+
+Clock second and seconds duration

Clock second and seconds duration is represented as follows:

+[i]["S"] + +

'300S', duration, 300 seconds

+
+ +

'28S', duration, the twenty-eighth clock second.

+
+Decade

The decade is represented as the following time scale component:

+[i]["J"] + +

'196J' in explicit form represents the decade of the 1960s, spanning the calendar years 1960 to 1969.

+
+ +

'0J' in explicit form represents the decade spanning calendar years 0 to 9.

+
+Century

The century is represented as the following time scale component:

+[i]["C"] + +

'16C', in explicit form represents the century of 1600s, spanning the calendar years 1600 to 1699.

+
+ +

'0C', in explicit form represents the century spanning the calendar years 00 to 99.

+
+Negative valuesGeneral

Certain time scale components are allowed to accept a negative integer as their value. The following representation is used for value that accepts a positive or negative integer.

+negi = [!]["`-`"][i] +

In order to convert a time scale component to accept negative values, the following representation is used, where c is a time scale component unit. If the time scale component accepts an integer value of '0', the value of the expression '-0' (negative zero) is considered equivalent to that of '0'.

+c(m) = [negi][c] +

Where,

+
    +
  • +

    [c] is the time scale component representation that accepts only positive [i];

    +
  • +
  • +

    [m] is a feature label indicating that the time scale component [c] accepts negative values.

    +
  • +
+

This representation only applies to time scale components that describe a time scale unit. Specifically, it does not apply to durations, time intervals, and repeating time intervals.

+ +

If "c" is the time scale component yearE in explicit form (see Part 1 4.3.2 b)), c(m) means "calendar year accepting a negative value". The explicit year representation [i]["Y"] becomes [negi]["Y"] when [i] is replaced with [negi], and expands to [!]["-"]][i]["Y"], which accepts the representations [i]["Y`"] or ["-"]"Y"]. In this expression, the value of [i] or ["-"`][i] represents an integer whose value identifies a calendar year.

+
+Calendar year

When a negative calendar year represents a date, the negative value is +to represent the number of years prior to year zero (0).

+

The representation for calendar year that accepts a negative value is as follows.

+year(m) + +

'-12Y' in date represents the the calendar year -12.

+
+ +

'-1Y' in date represents the year immediately preceding year 0.

+
+ +

Year zero is expressed as '0Y' in explicit form.

+
+Calendar week of year

When a negative calendar week of year represents a date, the negative +value is to represent the number of weeks counting in reverse from the +end of the calendar year, where the last week of the year is +represented by the integer value '-1'.

+

The representation for calendar week of year that accepts a negative value is as follows.

+week(m) + +

'-10W' in date represents the tenth last week of the year.

+
+ +

'-3W' in date represents the third last week of the year.

+
+Calendar day of month

When a negative calendar day of month represents a date, the negative +value is to represent the number of days counting in reverse from the +end of the calendar month, where the last day of the month is +represented by the integer value '-1'.

+

The representation for calendar day of month that accepts a negative value is as follows.

+day(m) + +

'-1D' in date represents the last day of the month.

+
+ +

'-5D' in date represents the fifth last day of the month.

+
+Calendar day of year

When a negative calendar day of year represents a date, the negative value is to represent the number of days counting in reverse from the end of the calendar year, where the last day of the year is represented by the integer value '-1'.

+

The representation for calendar day of year that accepts a negative value is as follows.

+dayo(m) + +

'-7O' in date represents the seventh last day of the calendar year, which is always December 25th.

+
+ +

'-306O' in date represents February 29th for a leap year, February 28th otherwise.

+
+Duration

A duration in the reverse direction, called a "negative duration" in +this document, can be expressed using the following representation +based on the duration representation specified in +5.4.2. +In this case, all time scale component within the duration +representation must be positive.

+duration(m) = [!]["`-"`][positive-duration] +

Where,

+
    +
  • +

    [positive-duration] is the [duration] representation that contains only time scale components that have positive [i].

    +
  • +
+ +

'-P100D' in date represents the duration of 100 days in the reverse direction.

+
+ +

'-P1Y3D' in date represents the duration of one years and three days in the reverse direction.

+
+ +

'-P20Y3M' describes a negative duration of twenty years and three months ago.

+
+Calendar year before year one

A suffix addition to time scale components for calendar year, decade and century +allows representation of calendar years before year one (1).

+

The representation is given as follows.

+[c]["B"] +

Where,

+
    +
  • +

    [c] is one of [yearE], [decE], [centE].

    +
  • +
+ +

'1YB' the first year before year one, equivalent to the effect of '0Y'.

+
+ +

'12YB' the twelfth year before year one, equivalent to the effect of '-11Y'.

+
+ +

'12JB' the twelfth decade before year one, equivalent to the effect of time interval +'-119/-110'.

+
+ +

'12CB' the twelfth century before year one, equivalent to the effect of time interval +'-1190/-1100'.

+
+Grouped time scale units + General +

A time scale unit can be grouped into a larger composite unit that +can each be specifically referred to using representations provided +in this clause.

+
+Unit definition

A grouped time scale unit ("grouped unit") defines a time scale unit +that is a composite of smaller time scale units. +Its representation is provided as follows +and is denoted as [groupUnit] in this document.

+["G"][durationUnits]["U"] +

Where,

+
    +
  • +

    ["G"] is the grouping prefix designator;

    +
  • +
  • +

    ["U"] is the grouping suffix designator;

    +
  • +
  • +

    [durationUnits], one or more time scale components for +expressing positive duration as specified in +.

    +
  • +
+

The definition of a grouped unit is a continuous one, such that there is no gap between two adjacent grouped units.

+ +

'G10DU', every unit of the grouped unit is of ten days duration.

+
+ +

'GT30MU', every unit of the grouped unit is of thirty minutes duration.

+
+ +

'G2DT6HU', every unit of the grouped unit is of two days and six hours duration.

+
+Unit value

The value of a grouped time scale unit is given with +the following representation. +This representation is denoted as [group] in this document.

+group = [i][groupUnit] +

Where,

+
    +
  • +

    [i] indicates the coefficient value of the grouped time scale unit;

    +
  • +
  • +

    [groupUnit] denotes an expression for a grouped time scale unit +().

    +
  • +
+ +

'5G10DU', the fifth unit of ten-day groups.

+
+ +

'20GT30MU', the twentieth unit of thirty-minute groups.

+
+ +

'2G2DT6HU', the second unit of two-day groups.

+
+ +

'2018-02-GP14D2I' and '2018Y02MGP14D2ID' are complete date representations that indicates "the second fortnight of February 2018", as specified by the rule "group every 14 days, second group".

+
+ +

'2018-03-GP10D3I' and '2018Y03MGP10D3ID' are complete date representations that indicates "the third 10-day block of March in 2018", as specified by the rule "group every 10 days, third group". A 10-day block is a time grouping commonly used in East Asia.

+
+ +

’16:GPT15M1I:00’ and 'T16HGPT15M1I0S' are complete time representations that indicates "the first quarter-hour of 16:00", as specified by the rule "group every 15 minutes, first group".

+
+ +

'2018-GP6M1I' and '2018YGP6M1IM' are date expressions (implied and explicit formats, respectively) of monthly precision that indicates "the first half of 2018", as specified by the rule "group every 6 months, first group", and therefore the grouping is specified in the [month] field. The resulting time interval is equivalent to the time interval expression '2018-01-01/2018-06-30'.

+
+Application within representationsGeneral

Grouped time scale units can be applied to date and time representations as +replacements for any time scale unit components as +long as the resulting expression is a valid one.

+ +

2018Y3G60DU6D is a valid date expression that refers to the date +year 2018, ordinal day of year 186 (which is July 5th).

+
+ +

2018Y9M2DT2GT8HU0H30M is a valid date and time expression that +refers to the date year 2018, September 2nd, 16:30.

+
+Use of grouped units

Date and time representations can incorporate the grouped +time scale units by applying rules from +and to a date and time representation +described by this document and , by +replacing a time scale unit component in the representations +with [group].

+

The following representation is used for date and time +representations (complete representation, reduced precision) +that incorporate grouped time scale units. This +representation is denoted as [groupDateTime] in this document.

+[higher-order-units][group][lower-units] +

Where,

+
    +
  • +

    [higher-order-units] contains time scale units (and their +values) that are of higher order compared to the highest order time +scale unit within the group unit;

    +
  • +
  • +

    [lower-order-units] is optional, it contains time scale +units (and their values) that are of equal or lower order compared to +the lowest order time scale unit within the group unit.

    +
  • +
+ +

[monthE][group][yearE] is an invalid date and time representation +as [monthE] has a lower order than that of [yearE].

+
+

When [lower-order-units] is omitted, the expression refers +to a unit of the grouped time scale unit.

+ +

[centE][group] is a valid date and time representation, +expressing in units of the grouped time scale unit.

+
+ +

'2018Y1G60DU' represents the first 60-day group of the +year 2018.

+
+ +

'2018Y2M2G14DU' refers to the second 14-day group +in February of year 2018, which is in effect referring to +"the second fortnight of February 2018".

+
+ +

'2018Y3M3G10DU' refers to the third 10-day block of March +in 2018. A 10-day block is a time grouping commonly used +in East Asia.

+
+ +

'T16H1GT15MU' refers to the first quarter-hour of 16:00.

+
+

When [lower-order-units] is present, the expression refers +to a date and time using the lowest time scale unit in the +[lower-order-units] expression.

+

Time scale components placed to the right of a grouped +time scale unit behaves identically to those after a typical +time scale component, such that the component to the right +refers to an instance or time interval "within" the +component at the left.

+ +

[yearE][group][dayE] is a valid date and time representation, +expressing in the calendar day time scale unit. The [dayE] +points to a calendar day within the expression [yearE][group].

+
+ +

[decE][group][timeE] is a valid date and time representation, +expressing in the lowest order time scale units specified in +[timeE], which is the clock second time scale unit. The [timeE] +points to a clock time within the expression [decE][group].

+
+ +

'2018Y3G60DU6D' represents the sixth day of the third +60-day group of the year 2018.

+
+ +

'2018Y20GT12HU3H' represents the third hour within the +twentieth 12-hour group of the year 2018.

+
+Adherence to grouped unit boundaries

Time scale unit values provided in [lower-order-units] must +not fall outside of the value bounds set by the group time scale unit +(the [group] expression).

+ +

'2018Y1G2MU30D' refers to the thirtieth day of the first +two-month group in year 2018. Since the first two-month group +of 2018 contains 59 days, the subsequent expression 30D falls +within the same grouped time scale unit.

+
+ +

'2018Y1G2MU60D' refers to the sixtieth day of the first +two-month group in year 2018. It is an invalid expression +as the first two-month group of 2018 only contains 59 days, +the expression 60D falls outside of the same grouped +time scale unit.

+
+Representation with time shift

A representation using grouped time scale units can be represented +with a time shift as:

+[groupDateTime][shiftE] + +

'2018Y1G60DUZ-5H', the first 60-day group of the year 2018, +five hours behind UTC.

+
+ +

'2018Y3G60DU6DZ8H' represents the sixth day of the third +60-day group of the year 2018, eight hours ahead of UTC.

+
+Conversion to basic time scale unitsGeneral

When an expression referring to a grouped time scale +unit has to be converted to use basic time scale units +(time scale units that are defined in ), +it can be converted into a time interval.

+ +

'2018Y1G6MU' refers to the first 6-month group of year 2018. +The resulting time interval is equivalent to that of the time interval +expression '2018Y1M/2018Y6M'.

+
+Truncation of partial units

When the duration of a grouped time scale unit does not cleanly +divide the original time scale component, the duration of +the last unit of the grouped time scale is only partially +located within the boundaries specified by the original time scale component.

+

In this case, the particular grouped time scale unit refers only +to the duration that is within bounds of the original time +scale component. The remaining duration that are out +of bounds shall be truncated.

+ +

2018Y9M4G8DU refers to the +"fourth 8-day grouping of September of year 2018", +but the fourth grouped unit only has 6 days within September +and 2 days in October. According to the truncation rule, only +the first 6 days belong to this grouped unit, and the resulting +time interval is 2018-09-25/2018-09-30.

+
+Spanning grouped unit boundaries

In order to express a time interval covered by the grouped +unit without regard to the boundaries of the original time component, +the same expression can be provided using time interval representation.

+ +

2018Y9M4G8DU, "fourth 8-day grouping of September of year 2018", +the start date of the fourth grouped unit can be found as 2018Y9M25D. +Therefore, the expression of 2018Y9M25D/P8D provides the full 8-day +duration of the unit, in the interval 2018Y9M25D/2018Y10M2.

+
+Explicit representations + General +

This section provides date and time representations using explicit form.

+
+Date + General +

The representations provided in this clause are collectively denoted as [dateE].

+
+Calendar date

The complete representation of a calendar date shall be as follows.

+[yearE][monthE][dayE] + +

'1985Y4M12D', calendar year 1985, April 12th.

+
+Ordinal date

A complete representation of an ordinal date shall be as follows.

+[yearE][dayoE] + +

'1985Y102O', calendar year 1985, ordinal day 102 of year.

+
+Week date

A complete representation of a week date shall be as follows.

+[yearE][weekE][daykE] + +

'1985Y15W5K', calendar year 1985, Friday of the calendar week 15.

+
+Time of dayLocal time of day

Representations of local time of day as defined below make no +provisions to prevent ambiguities in expressions that result from +discontinuities in the local time scale (e.g. daylight-saving time). +When the need arises to prevent these ambiguities, the representations +provided in may serve useful.

+

A complete representation of local time of day shall be as follows. +This representation shall be denoted as [timeE].

+["T"][hourE][minE][secE] + +

'T23H20M50S', a local time of day expression describing the fiftieth +seconds of the twentieth minute of the twenty-third clock hour.

+
+Beginning of the day

The complete representation of beginning of day in explicit form shall +be as follows.

+T0H0M0S +

Applying the rule of omitting zero-valued time scale components, it can also +be represented as:

+T0S +

There is no representation of end of day to prevent ambiguity of the +overlapping end of day and the beginning of the next day.

+Time shift

A time shift is used to represent the shift of local standard time +against UTC.

+

The complete representation of time shift in explicit form is represented +as follows, and is denoted as [shiftE] within this document.

+["Z"][!]["-"][timeE] +

Where,

+
    +
  • +

    ["Z"] is the time shift designator;

    +
  • +
  • +

    the leading minus sign (["-"]) is only applied when the time shift +expressed is behind UTC, it shall be omitted if the time shift is +ahead of or equal to UTC;

    +
  • +
  • +

    the expression [timeE] indicates the actual time shift from UTC.

    +
  • +
+

In accordance with , zero-valued +time scale components may be omitted in [timeE].

+ +

'Z-5H', the time shift is 5 hours behind UTC.

+
+ +

'Z8H', the time shift is 8 hours ahead of UTC.

+
+ +

'Z6H0M', the time shift is six hours ahead of UTC; the expression '0M' may be omitted +in accordance with .

+
+ +

'Z8H30M10S', the time shift is eight hours, thirty minutes and ten seconds ahead of UTC.

+
+

A single ["Z"] with the [timeE] portion empty, in accordance with the +rules specified in , indicates that the +time shift from UTC of day is zero, and is functionally equivalent to +the representation 'Z0H0M'.

+["Z"] + +

'Z', UTC where the time shift is zero.

+
+ +

'Z0H0M', UTC where the time shift is zero.

+
+Date with shift

The complete representation for date with a time shift is as follows.

+[dateE][shiftE] + +

'1985Y4M12DZ-5H', calendar year 1985, April 12th with a time shift of 5 hours behind UTC.

+
+Time of day with time shift

The complete representation for time of day with a time shift is as follows.

+[timeE][shiftE] + +

'T23H20M50SZ', 23:20:50 at UTC of day.

+
+ +

'T23H20M50SZ-5H0M', 23:20:50 at local time, which is 5 hours behind UTC.

+
+ +

'T23H20M50SZ8H', 23:20:50 at local time, which is 8 hours ahead of UTC.

+
+Date and time of day

A time can be expressed by combining a date expression () +with a time of day expression ().

+

The date part of a date and time expression must be complete. The time +may be incomplete ().

+

The representations provided in this clause are collectively denoted as +[datetimeE].

+Date and time only

The complete representation for date and time only is as follows.

+[dateE][timeE] + +

'1985Y4M12DT23H20M30S', calendar year 1985, April 12th, 23:20:30.

+
+Date and time with shift

The complete representation for date with time and a time shift is as follows.

+[dateE][timeE][shiftE] + +

'1985Y4M12DT23H20M30SZ8H', calendar year 1985, April 12th, 23:20:30, 8 hours ahead of UTC.

+
+Decade

The complete representation for decade is as follows.

+[decE] + +

'1880', the decade 1880s, spanning years from 1880 to 1889.

+
+Century

The complete representation for century is as follows.

+[centE] + +

'1300', the century 1300s, spanning years from 1300 to 1399.

+
+Omission of zero valued components

Time scale components within an explicit form that has a value of 0 may be omitted entirely with its corresponding designator, except when the omission of it affects the indication of precision.

+

In the representations given in this clause, if a time scale component of a higher order (compared to the lowest order component specified in the representation) is omitted, it is assumed to have the value "0" as long as the time scale component accepts the value "0" (4.3).

+ +

'1985Y4M15DT15H0M10S' and '1985Y4M15DT15H10S' can be both used to express +the time 3:00:10 p.m. on April 15th, 1985 in the Gregorian calendar.

+
+ +

'1988Y3M1DT2H0M0S' and '1988Y3M1DT2H' are unequal representations where the former expression has seconds precision, and the latter expression has hour precision.

+
+ +

'2018Y8M8DT30M0SZ': indicates the date 8th August 2018 at time 00:30:00 in UTC time of day Since the "hour" component is omitted and "seconds" included, the hour is assumed to be zero, and the expression has seconds precision. This is equivalent to the expression '2018Y08M08DT30M0SZ' in which zero padding is applied to calendar month and calendar day.

+
+Indication of precision

The lowest denoted time scale component in a date and time representation +indicates the precision level of the representation.

+ +

'1985Y4M' has calendar month precision.

+
+ +

'1985Y4M12DT2H' has clock hour precision.

+
+ +

'1985Y4M12DT30M' has clock minute precision, where the clock hour time +scale component is a zero-valued omission.

+
+Decimal fractions for time

A decimal fraction of hour, minute or second may be included in an expression in accordance with 5.2.1.4.

+ +

'2018Y8M8DT0,5H': indicates the date 8th August 2018 at time 00:30 with minutes precision.

+
+ +

'2018Y8M8DT10H30.5M': indicates the date 8th August 2018 at time 10:30:30 with seconds precision.

+
+ +

'2018Y8M8DT10H30M15,3S': indicates the date 8th August 2018 at time 10:30:15 plus 300ms with sub-second precision.

+
+Representations other than complete

Any of the representations given in this clause may be modified for reduced precision +() and decimal representation ().

+ +

'2018Y8M': indicates the date August 2018 with calendar month precision.

+
+ +

'2018Y8M8DT30M': indicates the date 8th August 2018 at time 00:30 with minute precision. Since the "hour" component is omitted, it is assumed to be zero because it is of a higher order than the lowest order component specified in the representation (here, "minutes). The omitted "`second" component does not form part of the representation because it is of a lower order than the lowest order component.

+
+Time intervalGeneral

A time interval shall be expressed by a start and an end date. +A solidus ["/"] is used as a separator to separate the two start and +end dates.

+

The complete representation of a time interval is defined as follows.

+[datetimeE]["/"][datetimeE] + +

'1985Y4M12DT23H20M50S/1985Y6M25DT10H30M0S', time interval beginning at +20 minutes and 50 seconds past 23 hours on 12 April 1985 local time of +day and ending at 30 minutes past 10 hours on 25 June 1985 local time +of day.

+
+Duration substitution

Providing a duration as an alternative to either a start or end date is +acceptable, given the start and end dates can be inferred from the given +duration of the time interval.

+ +

'1985Y4M12DT23H20M50S/P3D'

+
+ +

'P3D/1985Y4M12DT23H20M50S'

+
+Time scale component order

For expression of a time interval by a start and an end, higher order +time scale components may be omitted from the "end of time interval", +provided that the resulting expression is unambiguous. In this case the +omitted higher order components from the "start of time interval" +expression apply.

+ +

'2018Y1M15D/2M20D' represents '2018Y1M15D/2018Y2M20D' as the expression +'2M20D' unambiguously refers to the calendar month and calendar day +components, and the higher order components can be inherited from the +start date expression.

+
+Time shift indication

Representations for time zones and UTC included with the component +preceding the separator shall be assumed to apply to the component +following the separator, unless a corresponding alternative is included.

+ +

'2018Y1M15DZ5Y0M/2018Y2M20D' is equivalent to +'2018Y1M15DZ5Y0M/2018Y2M20DZ5Y0M' as the 'Z5H0M' time shift also +applies to the expression after the separator.

+
+Explicit durationGeneral

Duration can be expressed by a combination of time scale units +in explicit form — years, months, weeks, days, hours, minutes, and seconds.

+

These time scale components are specified in +, and are used to specify +positive duration.

+Durational units

Time scale unit components are used to compose a duration expression, +and are defined as "durational units".

+

The following time scale components can be combined +to form a representation denoted as [durationUnits] +for the expression of duration.

+[yearE][monthE][weekE][dayE]["T"][hourE][minuteE][secondE] +

Where,

+
    +
  • +

    each time scale component acting as a durational unit +(such as [monthE]) may be omitted;

    +
  • +
  • +

    the time designator symbol ["T"] is used to separate +the time scale components relating to the clock from those of +the calendar.

    +
  • +
+

Within [durationUnits], time scale components of higher order +shall be expressed before those of lower order.

+Representations + General +

The following representations are both considered complete +representations of duration.

+
+Composite representation

The composite representation of a duration, fully accepting +expressions of the duration representation given in +5.2.3, is given as follows.

+[!]["-"]["P"][durationUnits] +

Where,

+
    +
  • +

    [durationUnits] contains time scale components for expressing +positive duration.

    +
  • +
+ +

'P3D', duration of three days.

+
+ +

'P3W2D', duration of three weeks and two days, which is 23 days, as +equivalent to the expression of 'P23D'.

+
+ +

'P180Y800D', duration of one-hundred-and-eighty years and eight-hundred days.

+
+ +

The exact duration for some time scale components can only be +known when placed on the actual time scale.

+
+Precedence representation

The precedence representation of a duration is used for specifying +author intent in the evaluation order of time scale components within +a duration.

+

The representation of calendar duration time scale components +(denoted as [calendarD]) is provided as follows.

+["P"][calendarDU] +

Where,

+
    +
  • +

    [calendarDU] is one of [yearE], [monthE], [weekE], [dayE].

    +
  • +
+ +

P3D describes a duration of three days, in accordance with [calendarD].

+
+

The representation of clock duration time scale components +(denoted as [clockD]) is provided as follows.

+["P"]["T"][clockDU] +

Where,

+
    +
  • +

    [clockDU] is one of [hourE], [minuteE], [secondE].

    +
  • +
+ +

PT8H describes a duration of eight hours, in accordance with [clockD].

+
+

The duration precedence representation is described as follows, +denoted as [durationP].

+[!]["-"][durC-1][durC-2]...[durC-n] +

Where,

+
    +
  • +

    [durC-i] is either [calendarD] or [clockD];

    +
  • +
  • +

    the order of the [durC-i] components is used to determine the +evaluation precedence order of the duration statement [durationP].

    +
  • +
+ +

P1YP3MP2D describes a duration of one year, three months +and two days, to be evaluated in the order as described.

+
+ +

P2DP3MP1Y describes a duration of two days, three months +and one year, to be evaluated in the order as described.

+
+ +

PT10HP2DP3MP1Y describes a duration of ten hours, two days, three months +and one year, to be evaluated in the order as described.

+
+Negative duration

A duration with a negative value represents a duration in the reverse +direction of the proceeding time scale.

+ +

-P20Y3M describes a negative duration of twenty years and three months ago.

+
+ +

-P2DP3MP1Y describes a negative duration of two days, three months +and one year, to be evaluated in the order as described.

+
+ + Fractional duration +

A duration representation can be modified to accept a fractional value +in place of any [i] specified in a durational time scale component.

+
+Exact duration + General +

This clause describes methods to resolve exact duration in +face of ambiguities.

+
+Context-dependent duration

The exact duration of some time scale units can only be known +when placed on the actual time scale.

+ +

'P1Y' duration could be 365 or 366 calendar days depending on +whether the year is a leap year.

+
+ +

'P3M' duration could be 90, 91, 92 days depending on the actual +calendar months and calendar year.

+
+ +

'PT1M' duration is normally 60 seconds, but when the minute is the +last minute of the year, it could be 59, 60 or 61 seconds long +depending on whether a leap second is applied.

+
+ +

'P1Y2M15DT12H30M', duration of 1 year, 2 months, 15 days, 12 hours +and 30 minutes. The actual duration of the involved calendar months can +only be known when the duration is placed on an actual start date.

+
+Speculative duration

The exact duration of certain time scale unit may only be known +after an event occurs.

+

There is no universal rule to calculate leap seconds in advance, since +the decision to insert a leap second is driven by a number of dynamic +factors and only known when announced by the BIPM.

+

Specifically, the exact duration of the last clock minute of a +calendar year can only be known after it is announced by the BIPM, +whether a leap second has or will occur (in UTC). +This event is described in this document to occur at the +"leap second horizon date" for a calendar year.

+

The exact duration of the last clock minute in a calendar year +is one of the following duration:

+
    +
  • +

    when there is a positive leap second, 61 clock seconds;

    +
  • +
  • +

    when there is no leap second, 60 clock seconds; and

    +
  • +
  • +

    when there is a negative leap second, 59 clock seconds.

    +
  • +
+

For the accuracy of general purposes, it is acceptable to assume +the last clock minute always contains 60 clock seconds, just like +any other clock minute.

+

For cases where durational accuracy at the clock second level is +of importance, the following steps shall be taken:

+
    +
  • +

    When calculating exact duration prior to the leap second horizon +date of a specific calendar year involved, the last clock +minute is assumed to have no leap second, such that 59 is always +the last second of the year;

    +
  • +
  • +

    When calculating exact duration after the leap second horizon +date of a specific calendar year involved, the last clock +minute shall reflect the actual duration.

    +
  • +
+ +

'P3000Y12M31DT23H59M' is considered to have a duration of 60 clock seconds, +as the calendar year 3000’s leap second horizon date has not yet +occurred.

+
+ +

'P2016Y12M31DT23H59M' is considered to have a duration of 61 clock seconds, +since the leap second horizon date has already occurred, and it is known +that a positive leap second assigned to the calendar year 2016.

+
+Evaluation of date and time with durationGeneral

A date and time representation is modified by a duration +in many cases, including the calculation for:

+
    +
  • +

    time intervals when given duration as a start or end;

    +
  • +
  • +

    boundaries of grouped time scale units ();

    +
  • +
  • +

    conversion between of UTC of day and local time of day via time shifts; and

    +
  • +
  • +

    occurrences of recurring time intervals.

    +
  • +
+

This clause provides methods to calculate a consistent result +date and time, given an origin date and time ("origin") +and a duration time scale component (duration) to apply.

+

Modification of a date and time representation with +a duration is described using the following representation, +called a "date time formula".

+resolve(date, duration) +

or

+date + duration + +

2018Y9M10D + P1D is a date time formula.

+
+Prerequisite mechanismsCarry-over of overflow in time scale components

An "overflow" of a date and time expression is defined as assigning a +value exceeding the maximum value accepted by the time scale component.

+ +

An increase of P1M (duration) to 2018Y12M (date) will result in the expression +2018Y13M, where the month component is overflowed with value 13.

+
+

An overflow is considered resolved once the overflowed time scale unit +has transferred its excess to the immediate higher order time scale +component.

+ +

The overflowed expression 2018Y13M can be resolved to 2019Y1M.

+
+

An overflow can cause multiple carry-overs when the overflow not only +causes the immediate higher order time scale component to overflow, but +also subsequent higher order components.

+ +

The overflowed expression 2018Y12M366D can be resolved to 2018Y24M1D +(which still contains an overflow), which can be resolved to +2019Y12M1D (where there is no more overflow).

+
+Truncation at time scale component boundaries

A modification made to a higher order time scale component may +cause the value of a lower order time scale component to go beyond +its value boundaries. This condition is described as +"out of bounds" of a date and time expression.

+

This situation occurs when a modification is made to the values of +certain time scale components, because a lower order component +always has its maximum value bound by its immediate higher order +component:

+
    +
  • +

    clock minute (clock second value of 60 is only valid for a leap +second);

    +
  • +
  • +

    calendar month (calendar day values 29, 30, 31 are invalid for +some months); and

    +
  • +
  • +

    calendar year (ordinal day value of 366 and calendar month/day +combination of February 29th is only valid for a leap year).

    +
  • +
+ +

An increase of P1M (duration) to 2018Y1M31D (date) will result in +the expression 2018Y2M31D, which is an invalid date representation +as the calendar day value of 31 has exceeded the boundary of its +immediate higher order component, the month 2 (February).

+
+ +

An increase of P1Y (duration) to 2016Y12M31DT23H59M60S (date) will result in +the expression 2017Y12M31DT23H59M60S, which is an invalid date representation +as the clock second value of 60 has exceeded the boundary of its +immediate higher order component, the clock minute with its last second +at 59.

+
+

An out of bounds situation is considered resolved once the excess +value is truncated at the violating (lower order) time scale component.

+ +

The out of bounds expression 2019Y2M29D`" can be truncated to `2019Y2M28D.

+
+ +

The out of bounds expression 2020Y366O`" can be truncated to `2020Y365O.

+
+Simple duration

A simple duration is a duration expression with only +a single time scale component.

+

Evaluation of a date time formula that contains a simple duration +is to directly apply the durational unit to the corresponding +time scale component of the date and time representation +and applying carry-over.

+

The steps are as follows:

+
    +
  1. +

    Take the value of the time scale component in the simple duration, +directly modify the value of the corresponding time scale component +in the date and time representation.

    +
  2. +
  3. +

    In the resulting date and time representation, start from the +lowest order overflowed time scale component, perform carry-over +until there is no more overflow in the representation.

    +
  4. +
  5. +

    If any time scale components have become invalid, apply +truncation to them.

    +
  6. +
  7. +

    The resulting date and time representation is complete.

    +
  8. +
+

Calculation of 2022Y2M28D + P3D:

+
    +
  1. +

    Direct modification of date and time representation, obtains 2022Y2M31D.

    +
  2. +
  3. +

    Apply carry-over to overflowed components, obtains 2022Y3M02D.

    +
  4. +
+Composite duration

The method of evaluating of a date time formula with a +composite duration () is to directly +apply the durational units to the date and time representation +without truncation, and only applying carry-over at the end.

+

The steps are as follows:

+
    +
  1. +

    For all values of time scale components in the composite duration, +directly modify the values of the corresponding time scale components +in the date and time representation.

    +
  2. +
  3. +

    In the resulting date and time representation, start from the +lowest order overflowed time scale component, perform carry-over +on all overflowed time scale components, until there is no more +overflow in the representation.

    +
  4. +
  5. +

    If any time scale components have become invalid, apply +truncation to them.

    +
  6. +
  7. +

    The resulting date and time representation is complete.

    +
  8. +
+

Calculation of 2022Y2M30D + P1Y3M2D:

+
    +
  1. +

    Direct modification of date and time representation, obtains 2023Y5M32D.

    +
  2. +
  3. +

    Apply carry-over to overflowed components, obtains 2023Y6M31D.

    +
  4. +
  5. +

    The resulting representation is 2023Y6M31D.

    +
  6. +
+Precedence duration

The method of evaluating of a date time formula with a +precedence duration () is to apply the +durational units one by one to the date and time representation +with truncation and carry-over at every step.

+

The steps are as follows:

+
    +
  1. +

    Starting at the left side of the precedence duration expression, +process every durational unit one by one as follows:

    +
      +
    1. +

      Use the durational unit (which only contains one time scale +component), to modify the corresponding time scale component (the "target component") +in the date and time representation.

      +
    2. +
    3. +

      If the target component has overflowed in the previous step, +perform carry-over (to higher order time scale components), +until there is no more overflow in the representation.

      +
    4. +
    5. +

      If any time scale components of lower order than the +target component have become invalid, apply truncation +to them.

      +
    6. +
    +
  2. +
  3. +

    Once all durational units have been processed, the +resulting date and time representation is complete.

    +
  4. +
+

Calculation of 2022Y2M29D + P1YP3MP2D:

+
    +
  1. +

    Process the first durational unit: (2022Y2M29D + P1Y) + P3MP2D.

    +
  2. +
  3. +

    Apply the first durational unit to the date and time representation: +2023Y2M29D + P3MP2D.

    +
  4. +
  5. +

    No carry-over is necessary since there is no overflow.

    +
  6. +
  7. +

    Since 29D is of lower order than the target component (calendar +year), the representation is truncated: 2023Y2M28D + P3MP2D.

    +
  8. +
  9. +

    Process the second durational unit: (2023Y2M28D + P3M) + P2D.

    +
  10. +
  11. +

    Apply the second durational unit to the date and time representation: +2023Y5M28D + P2D.

    +
  12. +
  13. +

    No carry-over is necessary since there is no overflow.

    +
  14. +
  15. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  16. +
  17. +

    Process the third durational unit: 2023Y5M28D + P2D.

    +
  18. +
  19. +

    Apply the third durational unit to the date and time representation: +2023Y5M31D.

    +
  20. +
  21. +

    No carry-over is necessary since there is no overflow.

    +
  22. +
  23. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  24. +
  25. +

    The resulting date and time representation is 2023Y5M31D.

    +
  26. +
+

Calculation of 2022Y2M29D + P2DP3MP1Y:

+
    +
  1. +

    Process the first durational unit: (2022Y2M29D + P2D) + P3MP1Y.

    +
  2. +
  3. +

    Apply the first durational unit to the date and time representation: +2022Y2M31D + P3MP1Y.

    +
  4. +
  5. +

    Carry-over is necessary since there is the target component has overflowed: +2022Y3M2D + P3MP1Y.

    +
  6. +
  7. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  8. +
  9. +

    Process the second durational unit: (2022Y3M2D + P3M) + P1Y.

    +
  10. +
  11. +

    Apply the second durational unit to the date and time representation: +2022Y6M2D + P1Y.

    +
  12. +
  13. +

    No carry-over is necessary since there is no overflow.

    +
  14. +
  15. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  16. +
  17. +

    Process the third durational unit: 2022Y6M2D + P1Y.

    +
  18. +
  19. +

    Apply the third durational unit to the date and time representation: +2023Y6M2D.

    +
  20. +
  21. +

    No carry-over is necessary since there is no overflow.

    +
  22. +
  23. +

    No component of lower order than the target component is invalid, +hence truncation is not necessary.

    +
  24. +
  25. +

    The resulting date and time representation is P1Y.

    +
  26. +
+Involving fractional duration

When fractional duration () is applied +to context-dependent durational units (), +it is necessary to resolve the fractional duration in context.

+ +

The expression P0.5M ("half a month") is ambiguous because +the exact duration of a calendar month depends on its context, +and that the context for which P0.5M is anchored to is unclear.

+
+

The duration of a fractional, context-dependent, durational unit +can be obtained by first calculating a single unit of the durational +unit in context, such that, the exact duration for the durational +unit in whole (e.g. "P1M") becomes known. Once the exact duration +of a single unit is known, the duration of the fractional unit can +be calculated.

+date + frac-dur = + duration(date + unit(frac-dur), date) × value(frac-dur) + date +

Where,

+
    +
  • +

    unit(frac-dur) is the value of a single unit used in the duration frac-dur;

    +
  • +
  • +

    value(frac-dur) is the fractional value used with the duration frac-dur;

    +
  • +
  • +

    duration(date1, date2) is a function to calculate the duration between two dates or times, +such as or .

    +
  • +
+

Given that "date + unit(frac-dur)" can be calculated, this +method always produces a consistent value.

+

Given the expression: 2018-01-23 + P0.5M:

+
    +
  1. +

    It is rephrased as duration(2018-01-23 + P1M, 2018-01-23) × 0.5 + 2018-01-23.

    +
  2. +
  3. +

    It is reduced to duration(2018-02-23, 2018-01-23).

    +
  4. +
  5. +

    Then P31D × 0.5 + 2018-01-23.

    +
  6. +
  7. +

    Then P15.5D + 2018-01-23.

    +
  8. +
  9. +

    Since P15.5D is an exact duration (duration of calendar day is +known), P15.5D + 2018-01-23`" is resolvable and gives the final result`2018-02-07T12:00:00.

    +
  10. +
+Involving speculative duration

As described in , there is no universal +rule to calculate leap seconds in advance, since the decision +to insert a leap second is driven by a number of dynamic +factors and only known when announced by the BIPM.

+

The rules specified in are used +to evaluate a date time formula that involves leap seconds.

+

This example applies identically with or without a leap second. Given the expression: 2018-12-31T23:59:59 + PT1M:

+
    +
  1. +

    Apply the durational unit clock minute directly to the representation: 2018-12-31T23:60:59

    +
  2. +
  3. +

    Since 59 is the last clock minute, treat the overflow with carry-over: 2018-12-31T24:00:59

    +
  4. +
  5. +

    Since 23 is the last clock hour, treat the overflow with carry-over: 2018-12-32T00:00:59

    +
  6. +
  7. +

    Since 31 is the last calendar day of year, treat the overflow with carry-over: 2018-13-01T00:00:59

    +
  8. +
  9. +

    Since 13 is the last calendar month, treat the overflow with carry-over: 2019-01-01T00:00:59

    +
  10. +
  11. +

    The resulting expression is 2019-01-01T00:00:59.

    +
  12. +
+

Given the expression containing a leap second: 2016-12-31T23:59:60 + PT1M:

+
    +
  1. +

    Apply the durational unit clock minute directly to the representation: 2016-12-31T23:60:60

    +
  2. +
  3. +

    Since 59 is the last clock minute, treat the overflow with carry-over: 2016-12-31T24:00:60

    +
  4. +
  5. +

    Since 23 is the last clock hour, treat the overflow with carry-over: 2016-12-32T00:00:60

    +
  6. +
  7. +

    Since 31 is the last calendar day of year, treat the overflow with carry-over: 2016-13-01T00:00:60

    +
  8. +
  9. +

    Since 13 is the last calendar month, treat the overflow with carry-over: 2017-01-01T00:00:60

    +
  10. +
  11. +

    The clock second 60 is out of bounds, it is truncated to the maximum value: 2017-01-01T00:00:59

    +
  12. +
  13. +

    The resulting expression is 2017-01-01T00:00:59.

    +
  14. +
+

Given the expression containing a leap second: 2016-12-31T23:59:59 + PT1S:

+
    +
  1. +

    Apply the durational unit clock second directly to the representation: 2016-12-31T23:59:60

    +
  2. +
  3. +

    The resulting expression is 2016-12-31T23:59:60.

    +
  4. +
+
+ Normative References + + Date and time — Representation for information interchange — Part 1: Basic rules + ISO 8601-1:-- + + -- + + + + + ISO + + + ISO DATE: Under preparation. (Stage at the time of publication ISO/FDIS 8601-1) + +Bibliography + + 2018-12-11 + Information technology — ISO 7-bit coded character set for information interchange + https://www.iso.org/standard/4777.html + https://www.iso.org/obp/ui/#!iso:std:4777:en + https://www.iso.org/contents/data/standard/00/47/4777.detail.rss + ISO/IEC 646 + + + + International Organization for Standardization + ISO + www.iso.org + + + + + + International Electrotechnical Commission + IEC + www.iec.ch + + + 3 + en + fr + + + 90 + 93 + + + 1991 + + + ISO/IEC + + + + + + ISO 646:1983 + + + + + ISO/IEC 646:1991 + + + + ISO/IEC JTC 1/SC 2Coded character sets + + + 35.040.10 + Coding of character sets + + + + + 2018-12-11 + Data elements and interchange formats — Information interchange — Representation of dates and times + https://www.iso.org/standard/40874.html + https://www.iso.org/obp/ui/#!iso:std:40874:en + https://www.iso.org/contents/data/standard/04/08/40874.detail.rss + ISO 8601:2004 + + 2004 + + + + + International Organization for Standardization + ISO + www.iso.org + + + 3 + en + fr + + ISO 8601:2004 is applicable whenever representation of dates in the Gregorian calendar, times in the 24-hour timekeeping system, time intervals and recurring time intervals or of the formats of these representations are included in information interchange. It includesISO 8601:2004 does not cover dates and times where words are used in the representation and dates and times where characters are not used in the representation.ISO 8601:2004 does not assign any particular meaning or interpretation to any data element that uses representations in accordance with ISO 8601:2004. Such meaning will be determined by the context of the application. + + 90 + 92 + + + 2004 + + + ISO + + + + + + ISO 8601:2000 + + + + + ISO/FDIS 8601-1 + + + + + ISO/FDIS 8601-2 + + + + ISO/TC 154Processes, data elements and documents in commerce, industry and administration + + + 01.140.30 + Documents in administration, commerce and industry + + + + Date and time — Representation for information interchange — Part 2: Extensions + ISO 8601-2:-- + + -- + + + + + ISO + + + ISO DATE: Under preparation. (Stage at the time of publication ISO/FDIS 8601-2) + +
diff --git a/deploy_key.pub b/deploy_key.pub new file mode 100644 index 0000000..59596fd --- /dev/null +++ b/deploy_key.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWW6R8yxRKjV3IdItnpjWGF6pfPcqgYPQIzAkUW5qP19wkpc1uEHBg9ecsqVSlAhHj7kW8jUlfOhK5GHpNiTtJm6hn9ri1WG8UhRc2ISzbk29phmwgYJsgWG7Ha9ERIKZozWrfkn/XtZYEZDCiZnw/4+fFUMtgxdiloviwCWRnp3fQvPdLiectSf8uJC/klQg5PIMVp1SH0uezGCrg/gG9VzuA7c5taT0zbG95mF/Ls9JbwLZbssRB51JVuCMVkzNksyeiySRx7/KJ1L/ZAoaYTOWfvFfIerI2pWlCgu0XBUDiZLVRnYFeAwz9m58+d9aSTBv/jRgmsPJ8hISRQcYF ci@metanorma.org diff --git a/metanorma.release.yml b/metanorma.release.yml new file mode 100644 index 0000000..ae55338 --- /dev/null +++ b/metanorma.release.yml @@ -0,0 +1,2 @@ +documents: + - source: sources/cc-18011.adoc diff --git a/metanorma.yml b/metanorma.yml index 86cf3b2..dc544d0 100644 --- a/metanorma.yml +++ b/metanorma.yml @@ -1,7 +1,9 @@ ---- metanorma: deploy: - email: "ci@metanorma.org" + email: ci@metanorma.org + source: + files: + - sources/cc-18011.adoc relaton: collection: name: TC-DATETIME diff --git a/relaton/cache/ietf/ietf_rfc_5545.redirect b/relaton/cache/ietf/ietf_rfc_5545.redirect new file mode 100644 index 0000000..18b00d2 --- /dev/null +++ b/relaton/cache/ietf/ietf_rfc_5545.redirect @@ -0,0 +1 @@ +redirection IETF(RFC 5545) \ No newline at end of file diff --git a/relaton/cache/ietf/ietf_rfc_6350.redirect b/relaton/cache/ietf/ietf_rfc_6350.redirect new file mode 100644 index 0000000..d058424 --- /dev/null +++ b/relaton/cache/ietf/ietf_rfc_6350.redirect @@ -0,0 +1 @@ +redirection IETF(RFC 6350) \ No newline at end of file diff --git a/relaton/cache/ietf/rfc_5545.xml b/relaton/cache/ietf/rfc_5545.xml new file mode 100644 index 0000000..2489918 --- /dev/null +++ b/relaton/cache/ietf/rfc_5545.xml @@ -0,0 +1,44 @@ + + 2020-06-16 + Internet Calendaring and Scheduling Core Object Specification (iCalendar) + https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5545.xml + https://www.rfc-editor.org/info/rfc5545 + RFC 5545 + RFC5545 + 10.17487/RFC5545 + + 2009-09 + + + + + + B. Desruisseaux + + + + Internet Engineering Task Force + IETF + + + + + + + + Internet Engineering Task Force + IETF + + + en + + This document defines the iCalendar data format for representing and exchanging calendaring and scheduling information such as events, to-dos, journal entries, and free/busy information, independent of any particular calendar service or protocol. [STANDARDS-TRACK] + + RFC + 5545 + + Fremont, CA + + rfc + + \ No newline at end of file diff --git a/relaton/cache/ietf/rfc_6350.xml b/relaton/cache/ietf/rfc_6350.xml new file mode 100644 index 0000000..1c5570c --- /dev/null +++ b/relaton/cache/ietf/rfc_6350.xml @@ -0,0 +1,44 @@ + + 2020-06-16 + vCard Format Specification + https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6350.xml + https://www.rfc-editor.org/info/rfc6350 + RFC 6350 + RFC6350 + 10.17487/RFC6350 + + 2011-08 + + + + + + S. Perreault + + + + Internet Engineering Task Force + IETF + + + + + + + + Internet Engineering Task Force + IETF + + + en + + This document defines the vCard data format for representing and exchanging a variety of information about individuals and other entities (e.g., formatted and structured name and delivery addresses, email address, multiple telephone numbers, photograph, logo, audio clips, etc.). This document obsoletes RFCs 2425, 2426, and 4770, and updates RFC 2739. [STANDARDS-TRACK] + + RFC + 6350 + + Fremont, CA + + rfc + + \ No newline at end of file diff --git a/relaton/cache/ietf/version b/relaton/cache/ietf/version new file mode 100644 index 0000000..a9beb58 --- /dev/null +++ b/relaton/cache/ietf/version @@ -0,0 +1 @@ +79f3e4943490234b1100d3cb63d71040 \ No newline at end of file diff --git a/relaton/cache/iso/iso_8601_2004.xml b/relaton/cache/iso/iso_8601_2004.xml new file mode 100644 index 0000000..e698cff --- /dev/null +++ b/relaton/cache/iso/iso_8601_2004.xml @@ -0,0 +1,79 @@ + + 2020-06-17 + Data elements and interchange formats + Information interchange + Representation of dates and times + Data elements and interchange formats – Information interchange – Representation of dates and times + Éléments de données et formats d'échange + Échange d'information + Représentation de la date et de l'heure + Éléments de données et formats d'échange – Échange d'information – Représentation de la date et de l'heure + https://www.iso.org/standard/40874.html + https://www.iso.org/contents/data/standard/04/08/40874.detail.rss + ISO 8601:2004 + 8601 + + 2004 + + + + + International Organization for Standardization + ISO + www.iso.org + + + 3 + en + fr + + ISO 8601:2004 is applicable whenever representation of dates in the Gregorian calendar, times in the 24-hour timekeeping system, time intervals and recurring time intervals or of the formats of these representations are included in information interchange. It includesISO 8601:2004 does not cover dates and times where words are used in the representation and dates and times where characters are not used in the representation.ISO 8601:2004 does not assign any particular meaning or interpretation to any data element that uses representations in accordance with ISO 8601:2004. Such meaning will be determined by the context of the application. + ISO 8601:2004 is applicable whenever representation of dates in the Gregorian calendar, times in the 24-hour timekeeping system, time intervals and recurring time intervals or of the formats of these representations are included in information interchange. It includesISO 8601:2004 does not cover dates and times where words are used in the representation and dates and times where characters are not used in the representation.ISO 8601:2004 does not assign any particular meaning or interpretation to any data element that uses representations in accordance with ISO 8601:2004. Such meaning will be determined by the context of the application. + + 95 + 99 + + + 2004 + + + ISO + + + + + + ISO 8601:2000 + + + + + ISO 8601-1:2019 + + 2019 + + + + + + ISO 8601-2:2019 + + 2019 + + + + Geneva + + international-standard + + ISO/TC 154Processes, data elements and documents in commerce, industry and administration + + + 01.140.30 + Documents in administration, commerce and industry + + + ISO 8601 + + + \ No newline at end of file diff --git a/relaton/cache/iso/iso_iec_646.redirect b/relaton/cache/iso/iso_iec_646.redirect new file mode 100644 index 0000000..192561f --- /dev/null +++ b/relaton/cache/iso/iso_iec_646.redirect @@ -0,0 +1 @@ +redirection ISO(ISO/IEC 646 (all parts)) \ No newline at end of file diff --git a/relaton/cache/iso/iso_iec_646_all_parts.xml b/relaton/cache/iso/iso_iec_646_all_parts.xml new file mode 100644 index 0000000..ebd11f4 --- /dev/null +++ b/relaton/cache/iso/iso_iec_646_all_parts.xml @@ -0,0 +1,132 @@ + + 2020-06-16 + Information technology + ISO 7-bit coded character set for information interchange + Information technology – ISO 7-bit coded character set for information interchange + Technologies de l'information + Jeu ISO de caractères codés à 7 éléments pour l'échange d'information + Technologies de l'information – Jeu ISO de caractères codés à 7 éléments pour l'échange d'information + https://www.iso.org/standard/4777.html + https://www.iso.org/obp/ui/#!iso:std:4777:en + https://www.iso.org/contents/data/standard/00/47/4777.detail.rss + ISO/IEC 646 (all parts) + 646 + + 1991 + + + + + International Organization for Standardization + ISO + www.iso.org + + + + + + International Electrotechnical Commission + IEC + www.iec.ch + + + 3 + en + fr + + + 90 + 93 + + + 1991 + + + ISO/IEC + + + + + + ISO 646:1983 + + + + + 2020-06-16 + Information technology + ISO 7-bit coded character set for information interchange + Information technology – ISO 7-bit coded character set for information interchange + Technologies de l'information + Jeu ISO de caractères codés à 7 éléments pour l'échange d'information + Technologies de l'information – Jeu ISO de caractères codés à 7 éléments pour l'échange d'information + https://www.iso.org/standard/4777.html + https://www.iso.org/obp/ui/#!iso:std:4777:en + https://www.iso.org/contents/data/standard/00/47/4777.detail.rss + ISO/IEC 646:1991 + 646 + + 1991 + + + + + International Organization for Standardization + ISO + www.iso.org + + + + + + International Electrotechnical Commission + IEC + www.iec.ch + + + 3 + en + fr + + Specifies a set of 128 control and graphic characters such as letters, digits and symbols with their coded representation. Applies to alphabets of the Latin script. + Specifies a set of 128 control and graphic characters such as letters, digits and symbols with their coded representation. Applies to alphabets of the Latin script. + + 90 + 93 + + + 1991 + + + ISO/IEC + + + + + + ISO 646:1983 + + + Geneva + + + + + ISO 646:1983 + + + Geneva + + international-standard + + ISO/IEC JTC 1/SC 2Coded character sets + + + 35.040.10 + Coding of character sets + + + ISO/IEC 646 (all parts) + + + \ No newline at end of file diff --git a/relaton/cache/iso/version b/relaton/cache/iso/version new file mode 100644 index 0000000..efef980 --- /dev/null +++ b/relaton/cache/iso/version @@ -0,0 +1 @@ +d2ce9db481f8308dc568639910be49aa \ No newline at end of file diff --git a/submissions/20180831-datetime-explicit.zip b/submissions/20180831-datetime-explicit.zip new file mode 100644 index 0000000..ee1c6d3 Binary files /dev/null and b/submissions/20180831-datetime-explicit.zip differ diff --git a/submissions/20180831-datetime-explicit/csd-datetime-explicit.docx b/submissions/20180831-datetime-explicit/csd-datetime-explicit.docx new file mode 100644 index 0000000..4546a94 Binary files /dev/null and b/submissions/20180831-datetime-explicit/csd-datetime-explicit.docx differ diff --git a/submissions/20180831-datetime-explicit/csd-datetime-explicit.html b/submissions/20180831-datetime-explicit/csd-datetime-explicit.html new file mode 100644 index 0000000..ba13ca4 --- /dev/null +++ b/submissions/20180831-datetime-explicit/csd-datetime-explicit.html @@ -0,0 +1,1554 @@ + + + + Date and time — Explicit representation + + + + + + + + + + + + + + +
+

Working Draft

+
+ +
+

Calconnect Standard

+
+ + + +
+ +
+ + +
+
+ +
+
+ CD 18011(wd) + : + 2018 +
+ +
+ Date and time — Explicit representation + +
+
+ + + +
+ TC VCARD +
+
+ +
+
+ Calconnect Standard +
+ +
+ Working Draft +
+ + +
+ Warning for Drafts + +

+ This document is not a CalConnect Standard. It is distributed for review and + comment, and is subject to change without notice and may not be referred to as + a Standard. Recipients of this draft are invited to submit, with their + comments, notification of any relevant patent rights of which they are aware + and to provide supporting documentation. +

+
+ + + + +
+
+ + + +
+

 

+
+
+
+ + +
+ +

 

+
+
+
+
+
+

Foreword

+

The Calendaring and Scheduling Consortium ("CalConnect") is global non-profit +organization with the aim to facilitate interoperability of technologies across +user-centric systems and applications.

+

CalConnect works closely with liaison partners including international +organizations such as ISO, OASIS and M3AAWG.

+

The procedures used to develop this document and those intended for its further +maintenance are described in the CalConnect Directives.

+

In particular the different approval criteria needed for the different types of +CalConnect documents should be noted. This document was drafted in accordance with the +editorial rules of the CalConnect Directives.

+

Attention is drawn to the possibility that some of the elements of this +document may be the subject of patent rights. CalConnect shall not be held responsible +for identifying any or all such patent rights. Details of any patent rights +identified during the development of the document will be in the Introduction +and/or on the CalConnect list of patent declarations received (see +www.calconnect.com/patents).

+

Any trade name used in this document is information given for the convenience +of users and does not constitute an endorsement.

+

This document was prepared by Technical Committee VCARD.

+
+
+
+

Introduction

+

8601:2004 has been the international standard for date and time representations +and is applied widely, including in the RFC5545 and RFC6350 standards.

+

However, the representations provided in 8601:2004 require +fixed-length digits for time scale components, such as the +4-digit year, does not accept negative values, and does not +allow omission of a time scale component that has a zero value.

+

This document extends the "duration" representation +defined in 8601:2004 to fulfill the need of a flexible-length +representation, called the "explicit form".

+
+

Date and time — Explicit representation

+
+

1.  Scope

+

The purpose of this document is to provide a standard representation +of date and time that has time scale component values clearly +delimited by designated symbols, in order to minimize necessary +assumptions inherent to the representation format itself.

+

The date and time format representations described in this document +utilizes numbers, alphabets and symbols defined in 646. +These representations are meant to be both human recognizable and +machine readable.

+
+
+

2.  Normative references

+

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

+

8601:2004, Data elements and interchange formats -- Information interchange -- Representation of dates and times

+
+

3.  Terms and definitions

For the purposes of this document, the terms and definitions + given in ISO 8601-1 and the following apply.

+

3.1. Terms and definitions

3.1.1 

explicit form

+ +

date and time representation that uses designator symbols to delimit time scale components

+ +

3.1.2 

designator symbols

+ +

characters used to denote units of a time scale component

+

3.2. Symbols

3.2.1 

General

Representations and expressions specified in this document make use of the symbols listed in Clause 3.2.2 through Clause 3.2.6.

Representations (also referred to as "format representations") give rise to expressions for dates, times, intervals and recurring intervals.

To clearly separate date and time representations, from and the text, punctuation marks and associated symbols used to describe them, the following symbols are used to demarcate boundaries of expressions and representations in this document:

Quotation marks and brackets are not part of the expression or representation itself and must be omitted in implementation.

All characters used in date and time expressions and representations are part of the 646 repertoire, except for "hyphen", "minus" and "plus-minus". In an environment where use is made of a character repertoire based on 646, "hyphen" and "minus" should be both mapped onto "hyphen-minus".

The character "space" shall not be used in the expressions.

+ +
EXAMPLE 1 +

[YYYY] is a format representation for a calendar year, where each Y is to be replaced by a single digit creating an expression, for example '1985'.

+
+
EXAMPLE 2 +

The date and time representation [YYYY]["-"][MM]["-"][DD] gives rise to the expression '2003-02-10' which identifies 10 February 2003.

+
+ +
    +
  • +

    single quotation marks enclose expressions (for example '1985'); in some cases they are omitted to reflect the actualities of the examples;

    +
  • +
  • +

    all individual tokens that are part of a representation are contained between the open and close bracket symbols ("["` and "`]"), when used in a representation the bracket symbols are not part of any expression of that representation;

    +
    EXAMPLE +

    For the date and time representation [YYYY]["-"][MM]["-"][DD], [YYYY], ["-"], [MM], ["-"], and [DD] are individual tokens enclosed by brackets.

    +
    +
  • +
  • +

    when double quotations marks enclose a string within a representation, that string is a literal and becomes part of any expression of that representation.

    +
    EXAMPLE +

    The representation [i]["Y"] represents a positive integer followed by the symbol "Y". '12Y' meaning "12 years" is an expression of that representation.

    +
    +
  • +
+ + + +

Note 1 to entry: These designators are used for the designation of units of time and nominal durations in the representations defined in this document. For the designation of units of time and durations in other contexts, 80000-3 applies.

+

3.2.2 

Time scale component symbols

The following time scale component symbols are in implied form, for the representation of date and time.

+

year

+

time scale component calendar year

+

month

+

time scale component calendar month

+

week

+

time scale component calendar week of year

+

day

+

time scale component calendar day of month

+

dayk

+

time scale component calendar day of week

+

dayo

+

time scale component calendar day of year

+

hour

+

time scale component clock hour

+

min

+

time scale component clock minute

+

sec

+

time scale component clock second

+

dec

+

time scale component decade

+

cent

+

time scale component century

+
+

3.2.3 

Composite component symbols

+ +

dateE

+

the composite time scale components for the complete representation of a date as determined in Clause 6.3

+

timeE

+

the composite time scale components for the complete representation of a time of day as determined in Clause 6.4.1

+

shiftE

+

the composite time scale component for time shift in basic form with hours and minutes, as determined in Clause 4.13

+

durationE

+

the composite time scale units for the representation of a duration as determined in 8601:2004

+
+ +

3.2.4 

Symbols used in place of digits or signs

These symbols are used to represent characters in the date and time representations. They are used in representations only, and are replaced by one or more characters, as described, in expressions:

+

!

+

indicates that the token following this symbol is optional (may be omitted)

+

n

+

a positive integer or value, may be left absent to signify an unbounded value

+

i

+

a positive integer

+
+

3.2.5 

Designator symbols

These symbols are used to represent designators in the date and time expressions:

+

"H"

+

the hour designator, represented by the character "H", preceding a data element which represents the number of hours

+

"M"

+

the month or minute designator, represented by the character "M", preceding a data element which represents the number of months or minutes

+

"P"

+

the duration designator, represented by the character "P", preceding the component which represents the duration

+

"S"

+

the second designator, represented by the character "S", preceding a data element which represents the number of seconds

+

"T"

+

the time designator, represented by character "T", indicates:

+
    +
  • +

    the start of the representation of local time of day to designate local time of day expressions as such,

    +
  • +
  • +

    the start of the representation of the time of day in date and time of day expressions,

    +
  • +
  • +

    the start of the representation of the number of hours, minutes or seconds in expressions of duration

    +
  • +
+

"Y"

+

the year designator, represented by the character "Y", preceding a data element which represents the number of years

+

"U"

+

the decade designator, represented by the character "U", preceding a data element which represents the number of decades

+

"W"

+

the week designator, represented by the character "W", preceding a data element which represents the ordinal number of a calendar week within the calendar year

+

"K"

+

the calendar day of week designator, represented by the character "K", preceding a data element which represents the ordinal number of a calendar day within a calendar week

+

"O"

+

the calendar day of year designator, represented by the character "O", preceding a data element which represents the ordinal number of a calendar day within a calendar year

+

"Z"

+

the UTC designator, represented by the character "Z", added to the end of a time representation to indicate that a time of day is represented as UTC of day.

+

"G"

+

the grouping designator, represented by the character "G", indicates a grouping calculation applies to the time scale component

+
"x"
+

the representation of any character "x" as according to the textual representation of "x" in the 646 repertoire

+
+

3.2.6 

Separator symbols

In date and time expressions and date and time representations, the following characters are used as separators.

+

"/" (solidus)

+

the "/" solidus character separates start and end times in the representation of a time interval, as well as the symbol 'R' from the remainder of a recurring time interval representation. A solidus may be replaced with a double hyphen ["--"] by mutual agreement of the communicating partners.

+

"." (period) and "," (comma)

+

the "." period and "," comma characters are decimal signs used to separate the integer part from the decimal fraction of a number.

+
+
+

4.  Time scale components and units

+

4.1. General

+ +

The explicit forms of time scale units are represented in this clause.

+
+

4.2. Calendar year and years duration

The calendar year and years duration is represented as follows:

+

[!]["-"][i]["Y"]

+
EXAMPLE 1 +

'12Y', duration, twelve years

+
+
EXAMPLE 2 +

'-12Y', date, twelve years before year 0

+
+

4.3. Calendar month and months duration

The calendar month and months duration is represented as follows:

+

[i]["M"]

+
EXAMPLE +

'8M', 8 months

+
+

4.4. Calendar week number and weeks duration

The calendar week of year number and weeks duration is represented as +follows:

+

[!]["-"][i]["W"]

+
EXAMPLE 1 +

'10W', duration, ten weeks

+
+
EXAMPLE 2 +

'-10W', negative duration, the tenth last week of the year

+
+

When a negative calendar week of year represents a date, the negative +value is to represent the number of weeks counting in reverse from the +end of the calendar year, where the last week of the year is +represented by the integer value '-1'.

+

4.5. Calendar day of month and days duration

The calendar day of month and days duration is represented as follows:

+

[i]["D"]

+
EXAMPLE +

'25D', 25 days

+
+

When a negative calendar day of month represents a date, the negative +value is to represent the number of days counting in reverse from the +end of the calendar month, where the last day of the month is +represented by the integer value '-1'.

+

4.6. Calendar day of week

The calendar day of week is represented as the following time scale component:

+

[i]["K"]

+
EXAMPLE +

'1K' (calendar day of week Monday)

+
+

4.7. Calendar day of year

The calendar day of year is represented as the following time scale component:

+

[i]["O"]

+
EXAMPLE +

'350O' (ordinal day 350 of the calendar year)

+
+

When a negative calendar day of year represents a date, the negative +value is to represent the number of days counting in reverse from the +end of the calendar year, where the last day of the year is represented +by the integer value '-1'.

+

4.8. Clock hour and hours duration

Clock hour and hours duration is represented as follows:

+

[i]["H"]

+
EXAMPLE +

'6H' (six hours)

+
+

4.9. Clock minute and minutes duration

Clock minute and minutes duration is represented as follows:

+

[i]["M"]

+
EXAMPLE +

'30M' (30 minutes)

+
+

4.10. Clock second and seconds duration

Clock second and seconds duration is represented as follows:

+

[i]["S"]

+
EXAMPLE +

'30S' (30 seconds)

+
+

When a negative clock second represents a time, the negative value is +to represent the number of seconds counting in reverse from the end of +the clock minute, where the last second of the minute is represented by +the integer value '-1'.

+

4.11. Decade

The decade is represented as the following time scale component:

+

[i]["U"]

+
EXAMPLE +

'196U' (the 1960s)

+
+

4.12. Century

The century is represented as the following time scale component:

+

[i]["C"]

+
EXAMPLE +

'19C' (the 1900s)

+
+

4.13. Time shift

A time shift, often used in the representation of local standard time +against UTC, is represented as follows. This representation is denoted +as [shiftE].

+

["Z"][!]["-"][timeE]

+
EXAMPLE 1 +

'Z-05H'

+
+
EXAMPLE 2 +

'Z05H00M'

+
+
EXAMPLE 3 +

'Z05H30M10S'

+
+
EXAMPLE 4 +

'Z'

+
+

A single ["Z"] with the [timeE] portion empty indicates that there is +no time shift from UTC of day and is functionally equivalent to the +representation [Z00H00M].

+

The time shift shall be expressed as positive (i.e. with the leading +plus sign ["+"]) if it is ahead of or equal to UTC, and as negative +(i.e. with the leading minus sign ["-"]) if it is behind UTC.

+

4.14. Value restrictions

4.14.1. Negative values

+ +

Certain time scale components are allowed to accept a negative integer +as their value in [i].

+
+

4.14.2. Leading zeros

Leading zeros in an explicit form date time representation shall be omitted.

+
EXAMPLE +

The calendar month January is expressed as '1M', not '01M'.

+
+

4.14.3. Omission of zero valued components

Time scale components within an explicit form that has a value of '0' +may be omitted entirely with its corresponding designator.

+
EXAMPLE +

The date 1985 April 15th 3pm can be identically represented by +'1985Y4Y15DT15H' and '1985Y4Y15DT15H0M0S'.

+
+
+
+

5.  Grouping of time scale units

+

A time scale unit, expressed as an explicit time scale component value, +can be divided with the following syntax replacing the time scale +component value:

+

["G"][duration][i]["I"][symbol(c)]

+

Where,

+
    +
  • +

    ["G"], the grouping designator, indicates that this time scale +component is to be grouped;

    +
  • +
  • +

    [duration], a time scale component indicating the time interval of +the grouping unit;

    +
    EXAMPLE 1 +

    The duration of 'P6D' indicates the grouping is a 6-day block, 'P2M10D' +indicates the grouping is a block of 2 months and 10 days.

    +
    +
  • +
  • +

    ["I"] indicates that the subsequent number identifies an instance in +the grouped time interval; and

    +
  • +
  • +

    [i] indicates that the current selection points to the i-th group.

    +
  • +
+ + + + + +
EXAMPLE 2 +

'2018YGP6M1IM' is a reduced precision date representations of monthly +precision that indicates "the first half of 2018", as specified by the +rule "group every 6 months, first group", and therefore the grouping is +specified in the [month] field. The resulting time interval is +equivalent to the time interval expression '2018Y1M1D/2018Y6M30D'.

+
+ + + + + +
EXAMPLE 3 +

'2018Y02MGP14D2ID' is a complete date representations that indicates +"the second fortnight of February 2018", as specified by the rule +"group every 14 days, second group".

+
+ + + + + +
EXAMPLE 4 +

'2018Y03MGP10D3ID' is a complete date representation that indicates +"the third 10-day block of March in 2018", as specified by the rule +"group every 10 days, third group". A 10-day block is a time grouping +commonly used in East Asia.

+
+ + + + + +
EXAMPLE 5 +

'T16HGPT15M1I0S' is a complete time representation that indicates "the +first quarter-hour of 16:00", as specified by the rule "group every 15 +minutes, first group".

+
+
+
+

6.  Date and time representations

+

6.1. General

This section provides date and time representations using explicit form.

+

6.1.1. Omission of time scale components

Rules specified in Clause 4.14 applies to all representations +described in this clause.

+

If a time scale component of a higher order (compared to the lowest +order component specified in the representation) is omitted, it is +assumed to have the value "0" as long as the time scale component +accepts the value "0".

+

6.1.2. Indication of precision

The lowest denoted time scale component in a date and time representation +indicates the precision level of the representation.

+
EXAMPLE 1 +

'1985Y4M' has calendar month precision.

+
+
EXAMPLE 2 +

'1985Y4M12DT2H' has clock hour precision.

+
+
EXAMPLE 3 +

'1985Y4M12DT30M' has clock minute precision, where the clock hour time +scale component is a zero-valued omission.

+
+

6.2. Date

+ +
+

6.3. General

The representations provided in this clause are collectively denoted as [dateE].

+

6.3.1. Calendar date

The complete representation of a calendar date shall be as follows.

+

[yearE][monthE][dayE]

+
EXAMPLE +

'1985Y4M12D'

+
+

6.3.2. Ordinal date

A complete representation of an ordinal date shall be as follows.

+

[yearE][dayoE]

+
EXAMPLE +

'1985Y102O'

+
+

6.3.3. Week date

A complete representation of a week date shall be as follows.

+

[yearE][weekE][daykE]

+
EXAMPLE +

'1985Y15W5K'

+
+

6.4. Time of day

6.4.1. Local time of day

Representations of local time of day as defined below make no +provisions to prevent ambiguities in expressions that result from +discontinuities in the local time scale (e.g. daylight-saving time). +When the need arises to prevent these ambiguities, the representations +provided in local-time-shift may serve useful.

+

A complete representation of local time of day shall be as follows. +This representation shall be denoted as [timeE].

+

["T"][hourE][minE][secE]

+
EXAMPLE +

'T23H20M50S'

+
+

6.4.2. Beginning of the day

The complete representation of beginning of day in explicit form shall +be as follows.

+

T0H0M0S

+

Applying the rule of omitting zero-valued time scale components, it can also +be represented as:

+

T0H

+

There is no representation of end of day for information interchange to prevent +ambiguity of the overlapping end of day and the beginning of the next day.

+

6.4.3. Time of day with time shift

[timeE][shiftE]

+
EXAMPLE 1 +

'T23H20M50SZ' UTC.

+
+
EXAMPLE 2 +

'T23H20M50SZ-5H0M' 5 hours behind UTC.

+
+
EXAMPLE 3 +

'T23H20M50SZ+8H' 8 hours ahead of UTC.

+
+

6.5. Date and time of day

A time can be expressed by combining a date expression (Clause 6.2) +with a time of day expression (Clause 6.4).

+

The date part of a date and time expression must be complete. The time +may be incomplete (see time-of-day-reduced-precision).

+

The representations provided in this clause are collectively denoted as +[datetimeE].

+

6.5.1. Date and time only

The complete representation for date and time only is as follows.

+

[dateE][timeE]

+
EXAMPLE +

'1985Y4M12DT23H20M30S'

+
+

6.5.2. Date with shift

The complete representation for date with a time shift is as follows.

+

[dateE][shiftE]

+
EXAMPLE +

'1985Y4M12DZ-5H'

+
+

6.5.3. Date and time with shift

The complete representation for date with time and a time shift is as follows.

+

[dateE][timeE][shiftE]

+
EXAMPLE +

'1985Y4M12DT23H20M30SZ+8H'

+
+

6.6. Time interval

6.6.1. General

A time interval shall be expressed by a start and an end date. +A solidus ["/"] is used as a separator to separate the two start and +end dates.

+

The representation of a time interval is defined as follows.

+

[datetimeE]["/"][datetimeE]

+
EXAMPLE +

'1985Y4M12DT23H20M50S/1985Y6M25DT10H30M0S', time interval beginning at +20 minutes and 50 seconds past 23 hours on 12 April 1985 local time of +day and ending at 30 minutes past 10 hours on 25 June 1985 local time +of day.

+
+

6.6.2. Duration substitution

Providing a duration as an alternative to either a start or end date is +acceptable, given the start and end dates can be inferred from the given +duration of the time interval.

+
EXAMPLE +

'1985Y4M12DT23H20M50S/P3D'

+
+

6.6.3. Time scale component order

For expression of a time interval by a start and an end, higher order +time scale components may be omitted from the "end of time interval", +provided that the resulting expression is unambiguous. In this case the +omitted higher order components from the "start of time interval" +expression apply.

+
EXAMPLE +

'2018Y1M15D/2M20D' represents '2018Y1M15D/2018Y2M20D' as the expression +'2M20D' unambiguously refers to the calendar month and calendar day +components, and the higher order components can be inherited from the +start date expression.

+
+

6.6.4. Time shift indication

Representations for time zones and UTC included with the component +preceding the separator shall be assumed to apply to the component +following the separator, unless a corresponding alternative is included.

+
EXAMPLE +

'2018Y1M15DZ5Y0M/2018Y2M20D' is equivalent to +'2018Y1M15DZ5Y0M/2018Y2M20DZ5Y0M' as the 'Z5H0M' time shift also +applies to the expression after the separator.

+
+

6.7. Duration

6.7.1. General

Duration can be expressed by a combination of units — years, months, +weeks, days, hours, minutes, and seconds in explicit form.

+

A duration expression shall begin with ["P"]. Time scale components of +higher order shall be expressed before those of lower order.

+

["P"][!]["-"][duration-units]

+

Where,

+
    +
  • +

    [duration-units] contains time scale components for expressing +positive duration as specified in Clause 4

    +
  • +
+
EXAMPLE 1 +

'P3D', duration of three days.

+
+
EXAMPLE 2 +

'P3W2D', duration of three weeks and two days, which is 23 days, as +equivalent to the expression of 'P23D'.

+
+
EXAMPLE 3 +

'P180Y800D', duration of one-hundred-and-eighty years and eight-hundred days.

+
+

6.7.2. Negative duration

A duration with a negative value represents a duration in the reverse +direction of the proceeding time scale.

+
EXAMPLE 1 +

'P-20Y3M', a negative duration, meaning twenty years and three months ago.

+
+

NOTE  The exact duration for some time scale components can only be +known when placed in context, i.e. the actual time scale.

+
EXAMPLE 2 +

'P1Y2M15DT12H30M0S', duration of 1 year, 2 months, 15 days, 12 hours +and 30 minutes. The actual duration of the involved calendar months can +only be known when the duration is placed on an actual start date.

+
+
+
+
+

Bibliography

+

[1]  646, Information technology -- ISO 7-bit coded character set for information interchange

+

[2]  80000-1, Quantities and units -- Part 1: General

+

[3]  80000-3, Quantities and units -- Part 3: Space and time

+

[4]  ISO 8601-1, Date and time — Representation for information interchange — Part 1: Basic rules

+

[5]  ISO 8601-2, Date and time — Representation for information interchange — Part 2: Extensions

+

[6]  IEC Electropedia, + IEC Electropedia +

+
+
+ + + + + + + + + + + +