Data elements and interchange formats — Information ...

30
© ISO 2016 – All rights reserved Document type: International Standard Document subtype: Document stage: (20) PreparatoryStage Document language: E Documents:MyDocuments:Work:ISO-TC154:WG5:N-Documents:ISO-TC154- WG5_N0039_ISO_WD_8601-2_2016-02-16.docx STD Version 2.7f ISO/TC 154 N0039 Date: 2016-02-16 ISO/WD 8601-2 ISO/TC 154/WG 5 Secretariat: SAC Data elements and interchange formats — Information interchange - Representation of dates and times — Part 2: Extensions Eléments de données et formats d'échange — Échange d'information - Représentation de la date et de l'heure — Partie 2: Extensions Warning This document is not an ISO International Standard. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an International 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.

Transcript of Data elements and interchange formats — Information ...

Page 1: Data elements and interchange formats — Information ...

©ISO2016–Allrightsreserved

Documenttype:InternationalStandardDocumentsubtype:Documentstage:(20)PreparatoryStageDocumentlanguage:EDocuments:MyDocuments:Work:ISO-TC154:WG5:N-Documents:ISO-TC154-WG5_N0039_ISO_WD_8601-2_2016-02-16.docxSTDVersion2.7f

ISO/TC154N0039Date:2016-02-16

ISO/WD8601-2

ISO/TC154/WG5

Secretariat:SAC

Dataelementsandinterchangeformats—Informationinterchange-Representationofdatesandtimes—Part2:ExtensionsElémentsdedonnéesetformatsd'échange—Échanged'information-Représentationdeladateetdel'heure—Partie2:Extensions

Warning

ThisdocumentisnotanISOInternationalStandard.Itisdistributedforreviewandcomment.ItissubjecttochangewithoutnoticeandmaynotbereferredtoasanInternationalStandard.

Recipientsofthisdraftareinvitedtosubmit,withtheircomments,notificationofanyrelevantpatentrightsofwhichtheyareawareandtoprovidesupportingdocumentation.

Page 2: Data elements and interchange formats — Information ...

ISO/WD8601-2

ii ©ISO2016–Allrightsreserved

Copyrightnotice

ThisISOdocumentisaworkingdraftorcommitteedraftandiscopyright-protectedbyISO.Whilethereproduction ofworking drafts or committee drafts in any form for use by participants in the ISOstandards development process is permitted without prior permission from ISO, neither thisdocumentnoranyextractfromitmaybereproduced,storedortransmittedinanyformforanyotherpurposewithoutpriorwrittenpermissionfromISO.

RequestsforpermissiontoreproducethisdocumentforthepurposeofsellingitshouldbeaddressedasshownbelowortoISO'smemberbodyinthecountryoftherequester:

ISOcopyrightofficeCasepostale56•CH-1211Geneva20Tel.+41227490111Fax+41227490947E-mailcopyright@iso.orgWebwww.iso.org

Reproductionforsalespurposesmaybesubjecttoroyaltypaymentsoralicensingagreement.

Violatorsmaybeprosecuted.

Page 3: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved iii

Contents Page

1 Scope..........................................................................................................................................................1

2 Normativereferences..........................................................................................................................13 Termsanddefinitions..........................................................................................................................1

4 DateandTimeExtensions..................................................................................................................24.1 General.......................................................................................................................................................24.2 Uncertainand/orapproximatedate..........................................................................................................24.3 Unspecified................................................................................................................................................44.4 Beforeorafter............................................................................................................................................54.5 Enhancedtimeinterval..............................................................................................................................54.6 Yearexceedingfourdigits..........................................................................................................................64.7 Significantdigits.........................................................................................................................................74.8 Divisionsofayear......................................................................................................................................74.9 Oneofaset................................................................................................................................................84.10 Multipledates..........................................................................................................................................84.11 Decade.....................................................................................................................................................9

5 Repeatrulesforrecurringtimeintervals.....................................................................................95.1 Meansofspecifyingrepeatrules...............................................................................................................95.2 Separatorsanddesignators.....................................................................................................................105.3 Repeatrules.............................................................................................................................................105.4 Frequencyrulepart..................................................................................................................................105.5 Divisionalrulepart...................................................................................................................................105.6 Timeintervalrulepart.............................................................................................................................105.7 Byruleparts.............................................................................................................................................115.8 Completerepresentations.......................................................................................................................135.9 Representationsotherthancomplete.....................................................................................................13

AnnexA(normative)EBNFnotation...................................................................................................14

AnnexB(normative)ISO8601profiles.............................................................................................19B.1 Statementoftheproblem.......................................................................................................................19

AnnexC(informative)TheExtendedDate/TimeFormat-AProfileofISO8601(Parts1and2)............................................................................................................................................................21C.1 Introduction.............................................................................................................................................21

Page 4: Data elements and interchange formats — Information ...

ISO/WD8601-2

iv ©ISO2016–Allrightsreserved

Foreword

ISO (the International Organization for Standardization) is a worldwide federation of nationalstandards bodies (ISO member bodies). The work of preparing International Standards is normallycarriedout through ISO technical committees.Eachmemberbody interested ina subject forwhichatechnical committee has been established has the right to be represented on that committee.Internationalorganizations,governmentalandnon-governmental,inliaisonwithISO,alsotakepartinthe work. ISO collaborates closely with the International Electrotechnical Commission (IEC) on allmattersofelectrotechnicalstandardization.

The procedures used to develop this document and those intended for its further maintenance aredescribedintheISO/IECDirectives,Part1.InparticularthedifferentapprovalcriterianeededforthedifferenttypesofISOdocumentsshouldbenoted.ThisdocumentwasdraftedinaccordancewiththeeditorialrulesoftheISO/IECDirectives,Part2(seewww.iso.org/directives).

Attentionisdrawntothepossibilitythatsomeoftheelementsofthisdocumentmaybethesubjectofpatentrights. ISOshallnotbeheldresponsiblefor identifyinganyorallsuchpatentrights.DetailsofanypatentrightsidentifiedduringthedevelopmentofthedocumentwillbeintheIntroductionand/orontheISOlistofpatentdeclarationsreceived(seewww.iso.org/patents).

Anytradenameusedinthisdocumentisinformationgivenfortheconvenienceofusersanddoesnotconstituteanendorsement.

For an explanation on the meaning of ISO specific terms and expressions related to conformityassessment, as well as information about ISO's adherence to the WTO principles in the TechnicalBarrierstoTrade(TBT)seethefollowingURL:Foreword-Supplementaryinformation

The committee responsible for this document is ISO/154,Processes, data elements and documents incommerce,industryandadministration.

ThisfirsteditionofISO8601-2extendsISO8601-1:2016

ISO8601consistsofthefollowingpart,underthegenerictitleDataelementsandinterchangeformats—Informationinterchange-Representationofdatesandtimes:

— Part1:Basicrules

— Part2:Extensions

Page 5: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved v

Introduction

TobedevelopedduringtheCommitteeStage

Page 6: Data elements and interchange formats — Information ...
Page 7: Data elements and interchange formats — Information ...

WORKINGDRAFT ISO/WD8601-2

©ISO2016–Allrightsreserved 1

Dataelementsandinterchangeformats—Informationinterchange-Representationofdatesandtimes—Part2:Extensions

1 Scope

ThisInternationalStandard isapplicablewheneverrepresentationofdates intheGregoriancalendar,timesinthe24-hourtimekeepingsystem,extendingISO8601-1:2016.Itincludes

— calendar dates expressed in terms of calendar year, calendar month and/or calendar day of themonth;

— combinationofdateandtimeofdayincludinglocaltimebaseduponthe24hourtimekeepingsystemandthedifferencefromCoordinatedUniversalTime;

— Uncertainorapproximatedates,ordateswithportionsunspecified.

— timeintervals;

— Divisionsofayear;

— Setsandchoicesofcalendardates;

— repeatrulesforrecurringtimeintervals.

ThisInternationalStandarddoesnotcoverdatesandtimeswherewordsareusedintherepresentationanddatesandtimeswherecharactersarenotusedintherepresentation.

ThisInternationalStandarddoesnotassignanyparticularmeaningorinterpretationtoanydataelementthat uses representations in accordance with this International Standard. Such meaning will bedeterminedbythecontextoftheapplication.

2 Normativereferences

The following documents, inwhole or in part, are normatively referenced in this document and areindispensable for its application. For dated references, only the edition cited applies. For undatedreferences,thelatesteditionofthereferenceddocument(includinganyamendments)applies.

ISO/WD 8601-1:2016, Data elements and interchange formats — Information interchange -Representationofdatesandtimes—Part1:Basicrules

ISO/IEC14977:1996Informationtechnology—Syntacticmetalanguage—ExtendedBNF

3 Termsanddefinitions

Forthepurposesofthisdocument,thefollowingtermsanddefinitions.

Page 8: Data elements and interchange formats — Information ...

ISO/WD8601-2

2 ©ISO2016–Allrightsreserved

3.1uncertaindatewhosesourceisconsidereddubious

3.2 approximatedatewhichisanestimatewhosevalueisassertedtobepossiblycorrect,andifnot,closetocorrect

Note1toentry: Where'closetocorrect'means"closeenough,fortheapplication".

3.3unspecifiedpart of a datewhich is unstated,which could be because it has not (yet) been assigned (itmight beassignedinthefuture),orbecauseitisclassified,orunknown,orforanyotherreason.Theunspecifiedpartmaybetheyear,yearandmonth,month,monthandday,oryearandday.

4 DateandTimeExtensions

4.1 General

4.1.1 Extendedformat

For featuresdescribed in thispartof ISO8601,Clause4,only theextended format (YYYY-MM-DD) isused.Basicformat(YYYYMMDD)isnottobeused.

4.1.2 Levels

Fortheextensionfeatures,twolevelsaredefined:level1andlevel2.Eachmajorsubsectionofsection4coversageneralfeature;somefunctionscoveredbythatfeaturearelevel1andsomearelevel2.Theselevels are defined for the purpose of profiles, which may refer to the levels when specifyingconformancetotheprofile.ProfilesaredescribedinAnnexB.

4.2 Uncertainand/orapproximatedate

Thecharacter'?'(questionmark)isusedtomean"uncertain".Thecharacter'~'(tilde)isusedtomean"approximate".Thecharacter'%’(percent)isusedtomean“bothuncertainandapproximate".

4.2.1 Level1

Forlevel1,‘?,’‘~’,or‘%’mayonlyoccurattheendofthedatestring,anditappliestotheentiredate.

Format: YYYY-MM-DD? Example:1985-04-12? YYYY-MM-DD~ Example:1985-04-12~ YYYY-MM-DD% Example:1985-04-12%Representationswithreducedaccuracy

a) YearandmonthFormat:YYYY-MM?Example:2004-06?YYYY-MM~Example:1985-04~YYYY-MM%Example:1985-04%

b) YearonlyFormat:YYYY?Example:2004?YYYY~Example:1985~

Page 9: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 3

YYYY%Example:1985%4.2.2 Level2

Forlevel2,thecharacters‘?’,‘~’,and‘%’maybeusedtoqualifyaportionofthedate(notnecessarilythewholedate).

• Oneofthethreecharactersmayoccurimmediatelytotherightofoneofthedatecomponents,inwhichcaseitappliestothatcomponentaswellasanycomponentstotheleft.Forexampleifitoccursimmediatelytotherightoftheday,itappliestotheday,month,andyear(i.e.theentiredatestring).Ifitoccurstotherightofthemonth,itappliestothemonthandyear(butnottheday).Ifitoccurstotherightoftheyear,itappliestotheyearonly.Examples:

o 2004?-06-11uncertainyear;month,dayknown

o 2004-06~-11yearandmontharebothapproximate;dayknown

o 2004-06%-11yearandmontharebothuncertainandapproximate;dayknown

• Oneofthethreecharactersmayoccurimmediatelytotheleftofoneofthedatecomponents,inwhichcaseitappliesonlytothatcomponent.Forexampleifitoccursimmediatelytotheleftoftheday,itappliesonlytotheday(andnottothemonth,oryear).Ifitoccurstotheleftofthemonth,itappliesonlytothemonth(andnottotheyearorday).Ifitoccurstotheleftoftheyear,itappliesonlytotheyear(andnottothedayormonth)..Examples:

o 2004-?06-11uncertainmonth;yearanddayknown

o 2004-~06-11approximatemonth,yearanddayknown

o 2004-%06-11monthuncertainandapproximate,yearanddayknown

o ?2004-06-?11uncertainyearandday,monthknown

o ?2004-06-~11Yearuncertain,monthknown,dayapproximate

• Theabovetwofeaturesmaybecombinedo 2004-06?-~11

Yearandmonthuncertain(because‘?’istotherightofmonthmeaningthatitappliestomonthaswellascomponentstotheleftofmonth)anddayapproximate

o 2004?-06-~11Samemeaningas?2004-06-~11(earlierexample):Yearuncertain,monthknown,dayapproximate.

GuidelinesTherearecaseswheremorethanonestringhasthesamemeaning.Forexample:‘

1. ‘2015-02?-31’hasthesamemeaningas‘?2015-?02-31’.Inthiscase,thefirstformispreferredbecausetherearelessspecialcharacters.

2. 2015?-02-31hasthesamemeaningas?2015-02-31.Inthiscasethesecondformispreferred,becauseitmaysimplifyparsing.

3. 2015-02?-31’hasthesamemeaningas‘2015-?02?-31’.Inthiscase,thefirstformispreferredbecausethe‘?’in“?02”inthesecondformisredundant.

Page 10: Data elements and interchange formats — Information ...

ISO/WD8601-2

4 ©ISO2016–Allrightsreserved

4. 2015-02%-31?’hasthesamemeaningas‘2015-02~-31?’.Inthiscase,thefirstformispreferredbecauseitissimpler.

4.3 Unspecified

Thecharacter'X'maybeusedasareplacementcharacter,inplaceofadigittoindicatethatthevalueofthatdigitisunspecified.4.3.1 Level1

Thereplacementcharacter‘X’maybesubstitutedfortheright-mostdigitsinthefollowingcases:• Yearandmonthspecified,dayunspecified.• Yearspecified,dayandmonthunspecified.• Entiredateunspecified

Format:YYYY-MM-XXExample:1985-04-XXYYYY-XX-XXExample:1985-XX-XXXXXX-XX-XXExample:XXXX-XX-XX

RepresentationswithreducedaccuracyForrepresentationswithreducedaccuracy,‘X’maybeusedinthefollowingcases:

• Ayear-month,withmonthunspecified.• Ayear-month,withyearandmonthunspecified.• Ayearwithoneortwo(rightmost)unspecifieddigits.• Ayear,entireyearunspecified.

Format:YYYY-XXExample:2004-XXXXXX-XXExample:XXXX-XXYYYXExample:209XYYXXExample:20XXXXXXExample:XXXX

4.3.2 Level2

Forlevel2thecharacter‘X’maybeusedasareplacementforanycharacterinthestring.Examples156X-12-25December25sometimeduringthe1560s15XX-12-25December25sometimeduringthe1500s15XX-12-XXSomedayinDecemberinsomeyearduringthe1500s1560-XX-25The25thdayofsomemonthinyear1560.1560-X2ThemonthofeitherFebruaryorDecemberoftheyear1560.1XXX-XXSomemonthduringthe1000s1XXX-12SomeDecemberduringthe1000s1XXXSomeyearduringthe1000s1XX3Someyearendingin3duringthe1000s

Page 11: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 5

4.4 Beforeorafter

Adatemaybequalifiedtoindicate“beforeoron”or“onorafter”thedate.

4.4.1 Level1

Thisfeatureisnotusedinlevel1.

4.4.2 Level2

Forlevel2,thedotnotation“..”(twodots)maybeusedbeforeadatetodenote“beforeoronthedate”orafteradatetodenote“onthisdateorafter:

Examples

• ..1984beforeorduringtheyear1984• 1984..duringtheyear1984orlater• ..1984-04-04beforeoron4April1984

4.5 Enhancedtimeinterval

AnenhancedtimeintervalextendsthespecificationoftimeintervalinPart1ofthisstandard(startandenddateseparatedby‘/’)byindicatingthatthestartorenddateis:

• Unknown.Startorenddateunknown.Thecharacter‘*’(asterisk)maybeusedforthestartorenddatetoindicate“unknown”.

• OpenStartordateopen.Thestartorenddatemaybeleftblank,eitherbecausethereisnoneorforanyotherreason.

Thefollowingareallowedbutshouldbeusedonlywithcaution:• ‘*/*startandendbothunknown• ‘/’startandenddatebothopen• ‘*/’Startunknown,endopen• ‘/*’.Startopen,endunknown

4.5.1 Level1

format:YYYY-MM-DD/*Example:1985-04-12/**/YYYY-MM-DDExample:*/1985-04-12YYYY-MM-DD/Example:1985-04-12//YYYY-MM-DDExample:/1985-04-12Inadditionamodifiermayappearattheendofthedatetoindicate"uncertain"and/or"approximate"asdescribedin4.2.Examples:

• 1984-01-02~/2004-06-04beginningapproximately1984-01-02andending2004-06-04

• 1984-01-02~/beginningapproximately1984-01-02;noenddate

• 1984-01-02~/*beginningapproximately1984-01-02;enddateunknown

Page 12: Data elements and interchange formats — Information ...

ISO/WD8601-2

6 ©ISO2016–Allrightsreserved

• 1984~/2004-06beginningapproximately1984andendingJune2004

• 1984/2004-06~beginning1984andendingapproximatelyJune2004

• 1984?/2004%beginningisuncertainbutthoughttobe1984;endisuncertainbutthoughttobeapproximately2004

4.5.2 Level2

TheLevel2enhancedtimeintervalfeatureextendsLevel1:• Portionsofadatemaybedesignatedasapproximate,uncertain,orunspecified.• Thestartdatemaybetaggedas“beforeor”thatdate,andtheenddate“orafter”.

Examples:

• 2004-06-~01/2004-06-~20AtimeintervalinJune2004beginningapproximatelythefirstandendingapproximatelythe20th.

• 2004-06-XX/2004-07-03ThetimeintervalbeganonanunspecifieddayinJune2004andendedJuly3.

• ..2004-06-01/~2004-06-20Atimeintervalbeginningbeforeoron1June2004andendingapproximatelythe20th

• 2004-06-01~/2004-06-20..Atimeintervalbeginningbeforeapproximately1June2004andthe20thorlater.

4.6 Yearexceedingfourdigits

Part1ofthisstandardallowsayeartoexceedfourdigits(ayearafter9999orbefore-9999)howeveritrequiresmutualagreementofthepartnersintheinformationexchange.Presentedhereisanalternativemethod,whichdoesnotrequiremutualconsent.Itmaybeusedonlyfordateswhereonlytheyearissignificant,notthemonthorday.4.6.1 Level1

'Y’maybeusedatthebeginningofthedatestringtosignifythatthedateisayear,when(andonlywhen)theyearexceedsfourdigits,i.e.foryearslaterthan9999orearlierthan-9999.

Format:“Y”YYYYY…..Example:Y170000002(theyear170000002)“Y-”YYYYY…..Example:Y-170000002(theyear-170000002)4.6.2 Level2(needsreconsideration)

Level2presentsanalternative,exponentialform.'E'isusedtomean"times10tothepowerof"thus17E8means"17times(10totheeighthpower)",or170000000000.(Andasinlevel1.'Y'atthebeginningofthestringindicates"year”.)Examples

• y17E7theyear170000000

• y-17E7theyear-170000000

Page 13: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 7

4.7 Significantdigits

Whenayearisfollowedby‘S’,followedbyapositiveinteger,theintegerindicatesthenumberofsignificantdigitsfortheexpressedyear.4.7.1 Level1

Thisfeatureisnotusedinlevel1.

4.7.2 Level2

Forlevel2thisfeaturemaybeusedforanyofthefollowingthreewaystoexpressayear:• Four-digityear• Yearlongerthanfourdigitsexpressedasaninteger.• Yearexpressedinexponentialform.

Examples

• 1950S2Someyearbetween1900and1999,estimatedtobe1950.

• Y171010000S3Someyearbetween171000000and171999999,estimatedtobe171010000.

• Y17101E4S3Samemeaningaspreviousexample.

4.8 Divisionsofayear

Forayear-and-monthexpression(e.g.1984-04)themonthcomponentmaytakeonvaluesof21orabove(inplaceofamonthvalue,01through12).Thesevaluessignifyadivisionofayear(e.g.“theseasonSpring”).4.8.1 Level1

Thevalues21,22,23,24maybeusedtosignify'Spring','Summer','Autumn','Winter',respectively.Format:YYYY-SSExample:2001-21(Spring,2001)

4.8.2 Level2

Valuesgreaterthan24maybeused.Thisspecificationprovidesaninitialsetofvalues,andtherewillbearegistrationmechanismforadditionalvalues.Theinitialsetsofvaluesfortraditionaldivisionofayearare:21-24=Spring,Summer,Autumn,Winter,independentof“Hemisphere”25-28=Spring-NorthernHemisphere,Summer-NorthernHemisphere,Autumn-NorthernHemisphere,Winter-NorthernHemisphere29-32=Spring–SouthernHemisphere,Summer–SouthernHemisphere,Autumn–SouthernHemisphere,Winter-SouthernHemisphere33-36=Quarter1,Quarter2,Quarter3,Quarter4(3monthseach)37-39=Quadrimester1,Quadrimester2,Quadrimester3(4monthseach)

Page 14: Data elements and interchange formats — Information ...

ISO/WD8601-2

8 ©ISO2016–Allrightsreserved

40-41=Semestral1,Semestral-2(6monthseach)4.9 Oneofaset

Squarebracketsenclosingalistofdatesareusedtomean“oneofthesedates”.Thisfeaturemaybeusedforexampletoexpress“YearofPublication”,whenitisknownthattheyearisoneofasetofyears,forexample1984,1986,or1988.4.9.1 Level1

Thisfeatureisnotusedforlevel1.

4.9.2 Level2

Forlevel2double-dotnotationmaybeused.double-dotindicatesallthevaluesbetweenthetwovaluesitseparates,inclusive.Double-dotatthebeginningorendofthelistmeans"onorbefore"or"onorafter"respectively;seethesecond,third,andfourthexamplebelow.Differentelementsofalistmayhavedifferentprecisions,asinthefifthexample.Examples

• [1667,1668,1670..1672]Oneoftheyears1667,1668,1670,1671,1672

• [..1760-12-03]December3,1760;orsomeearlierdate

• [1760-12..]December1760,orsomelatermonth

• [1760-01,1760-02,1760-12..]JanuaryorFebruaryof1760orDecember1760orsomelatermonth

• [1667,1760-12]Eithertheyear1667orthemonthDecemberof1760.

4.10 Multipledates

Curlybracesmaybeusedtowrapaninclusivelist(allmembersincluded).Forexample{1960,1961,1962,1963}mightbeusedtoindicatetheyearsofpublicationofabook-itwaspublishedineachof1960,1961,1962,and1963.Differentelementsofalistmayhavedifferentprecisions,asinthesecondexample.4.10.1 Level1

Thisfeatureisnotusedinlevel1.

4.10.2 Level2

Examples• {1667,1668,1670..1672}

Alloftheyears1667,1668,1670,1671,1672• {1960,1961-12}

Theyear1960andthemonthDecemberof1961.

Page 15: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 9

4.11 Decade

Astringconsistingofthreedigitsrepresentsadecade,forexample“the1960s”.Itistheten-yeartimeintervalofthoseyearswherethethreespecifieddigitsarethefirstthreedigitsoftheyear.Representationofadecademustbeexactlythreedigits,leadingzeros,ifany,mustbeincluded.Thusthetimeinterval200through209isrepresentedas‘020’andNOT‘20’;thelatterwouldrepresentthetimeinterval2000through2099.Furthermore,‘196’isnottobeconfusedwiththeyear196,thatwouldberepresentedas‘0196’.4.11.1 Level1

Thisfeatureisnotusedforlevel1.

4.11.2 Level2

Format:YYYExample:196(1960-1969)Example:196~(approximatedecade)Note:asadecadeexpressesdecadeprecision,inthesecondexample,“approximatedecade”meansforexample“thedecadeisapproximatedtobethe1960s,butitmightbethe1950sor1970s.”ItdoesNOTmeanthetimeintervalbeginningapproximatelyatthebeginningofandendingapproximatelyattheendofthe1960s.Thelatterwouldbeexpressedas1960~/1970~andwouldhaveyearprecision.

5 Repeatrulesforrecurringtimeintervals

ThissectionextendsISO8601-1:2016,4.5“RecurringTimeInterval”,byaddingarulepartthatdefinestherepeatpatterntotheendoftherecurringtimeintervalstructure.

Allfeaturesinthissectionaredefinedatlevel1forthepurposeofprofiles,whichmayrefertothelevelswhenspecifyingconformancetotheprofile.(ProfilesaredescribedinAnnexB.)

The section is based on the [RFC 5545:2009] “Internet Calendaring and Scheduling Core ObjectSpecification (iCalendar), Section 3.3.10, Recurrence Rule” to ensure easy migration and transitionbetweenthetwostandards.

5.1 Meansofspecifyingrepeatrules

Repeatrulesforrecurringtimeintervalsshallbeexpressedinoneofthefollowingways.

a) Byanumberofrecurrences(optional),astartandendofthetimeinterval,andrepeatrule.Ifthenumberofrecurrencesisabsent,thenumberofoccurrencesisunbounded.

b) Byanumberofrecurrences(optional),adurationandrepeatrule.Ifthenumberofrecurrencesisabsent,thenumberofoccurrencesisunbounded.

c) Byanumberofrecurrences(optional),astartanddurationofthetimeinterval,andrepeatrule.Ifthenumberofrecurrencesisabsent,thenumberofoccurrencesisunbounded.

d) Byanumberofrecurrences(optional),adurationandendofthetimeinterval,andrepeatrule.Ifthenumberofrecurrencesisabsent,thenumberofoccurrencesisunbounded.

Page 16: Data elements and interchange formats — Information ...

ISO/WD8601-2

10 ©ISO2016–Allrightsreserved

5.2 Separatorsanddesignators

Repeatrulesforarecurringtimeintervalisexpressedaccordingtothefollowingstructure.

Allrepresentationsstartwiththedesignator[R],followed,withoutspaces,bythenumberofrecurrences,ifpresent,followed,withoutspaces,byasolidus[/],followed,withoutspaces,bytheexpressionofatimeintervalasperISO8601-1:2016,4.4.1,withoutspaces,byasolidus[/],followed,withoutspaces,followedbytherepeatruleasper5.3.Fortherepresentations5.1a),5.1b),5.1c)and5.1d)thetimeintervalsasperISO8601-1:2016,4.4.1a),4.4.1b),4.4.1c)and4.4.1d)shallbeused,respectively.

5.3 Repeatrules

Arepeatrule[RRULE]shallbeexpressedasastructuredcomponentconsistingofalistofoneormorerepeatruleparts.Eachrulepartisdefinedbyaname=valuepair.Therulepartsareseparatedfromeachotherbythesemicolon[;]character.Therulepartsarenotorderedinanyparticularsequence.Individualrulepartsmustonlybespecifiedonce.

5.4 Frequencyrulepart

The“Frequency”[FREQ]rulepartidentifiesthetypeofrecurrencerule.ThisrulepartMUSTbespecifiedintherepeatruleunlessthe“Divisional”[DIVI]ispresent,onlyoneofthetwocanbeused.ValidvaluesincludeSECONDLY[SE],tospecifyrecurringtimeintervalsbasedonatimeintervalofasecondormore;MINUTELY[MI],tospecifyrecurringtimeintervalsbasedonatimeintervalofaminuteormore;HOURLY[HR],tospecifyrecurringtimeintervalsbasedonatimeintervalofanhourormore;DAILY[DY],tospecifyrecurringtimeintervalsbasedonatimeintervalofadayormore;WEEKLY[WE],tospecifyrecurringtimeintervalsbasedonatimeintervalofaweekormore;MONTHLY[MO],tospecifyrecurringtimeintervalsbasedonatimeintervalofamonthormore;andYEARLY[YR],tospecifyrecurringtimeintervalsbasedonatimeintervalofayearormore.

5.5 Divisionalrulepart

The“Divisional”[DIVI]rulepartidentifiesthetypeofrecurrencerule.ThisrulepartMUSTbespecifiedin the repeat rule unless the “Frequency” [FREQ] is present, only one of the two can be used. Valid“Divisionofayear”valuesaredefinedinsection4.8.2.

5.6 Timeintervalrulepart

The“Timeinterval”[INTR]rulepartcontainsapositiveintegerrepresentingatwhichtimeintervalsthe“Frequency”or“Divisional”rulepartrepeats.Thedefaultvalueruleis"1",meaningeverysecondforaSECONDLYrule,everyminuteforaMINUTELYrule,everyhourforanHOURLYrule,everydayforaDAILYrule,everyweekforaWEEKLYrule,everymonthforaMONTHLYrule,everyyearforaYEARLYrule,andasinglerepeatforeachDIVISIONALrule.

Forexample,usedwiththeFREQUENCYrulevalueofDAILYrule,avalueof"8"meanseveryeightdays:

FREQ=DA;INTR=8

UsedwithaDIVISIONALrulevalueofSUMMER,avalueof“2”meanseverysecondsummer:

DIVI=22;INTR=2

Page 17: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 11

5.7 Byruleparts

“Byruleparts”[BYXX]modifiestherepeatsinsomemanner.Byrulepartsforatimeintervalofthesamelengthorlongerthanthefrequencygenerallyreducesorlimitsthenumberofoccurrencesoftherepeatsgenerated.

Example:

FREQ=DA;BYMO=1reducesthenumberofrepeatinstancesfromalldays(ifByMonthrulepartisnotpresent)toalldaysinJanuary.

Byrulepartsforatimeintervalshorterthanthefrequencygenerallyincreasesorexpandsthenumberofoccurrencesoftherepeats.

Example:

FREQ=YE;BYMO=1,2increasesthenumberofdayswithintheyearlyrepeatsetfrom1(ifByMonthrulepartisnotpresent)to2.

5.7.1 Bysecondrulepart

The“BySecond”[BYSE]rulepartspecifiesacomma-separatedlistofsecondswithinaminute.Validvaluesare0to59.

5.7.2 Byminuterulepart

The“ByMinute”[BYMI]rulepartspecifiesacomma-separatedlistofminuteswithinanhour.Validvaluesare0to59.

5.7.3 Byhourrulepart

The“ByHour”[BYHR]rulepartspecifiesacomma-separatedlistofhoursoftheday.Validvaluesare0to23.

5.7.4 Bydayrulepart

The“ByDay”[BYDY]rulepartspecifiesacomma-separatedlistofdaysoftheweek;MOindicatesMonday;TUindicatesTuesday;WEindicatesWednesday;THindicatesThursday;FRindicatesFriday;SAindicatesSaturday;andSUindicatesSunday.

EachByDayvaluecanalsobeprecededbyapositive(+n)ornegative(-n)integer.Ifpresent,thisindicatesthenthoccurrenceofaspecificdaywithintheMONTHLYorYEARLY"RRULE".

Forexample,withinaMONTHLYrule,+1MO(orsimply1MO)representsthefirstMondaywithinthemonth,whereas-1MOrepresentsthelastMondayofthemonth.ThenumericvalueinaByDayrulepartwiththeFREQrulepartsettoYEARLYcorrespondstoanoffsetwithinthemonthwhentheByMonthrulepartispresent,andcorrespondstoanoffsetwithintheyearwhentheByWeekNoorByMonthrulepartsarepresent.Ifanintegermodifierisnotpresent,itmeansalldaysofthistypewithinthespecifiedfrequency.Forexample,withinaMONTHLYrule,MOrepresentsallMondayswithinthemonth.TheByDayrulepartMUSTNOTbespecifiedwithanumericvaluewhentheFREQrulepartisnotsettoMONTHLYorYEARLY.Furthermore,theByDayrulepartMUSTNOTbespecifiedwithanumericvaluewiththeFREQrulepartsettoYEARLYwhentheByWeekNorulepartisspecified.

Page 18: Data elements and interchange formats — Information ...

ISO/WD8601-2

12 ©ISO2016–Allrightsreserved

5.7.5 Bymonthdayrulepart

The“ByMonthDay”[BYMD]rulepartspecifiesacomma-separatedlistofdaysofthemonth.Validvaluesare1to31or-31to-1.Forexample,-10representsthetenthtothelastdayofthemonth.TheByMonthDayrulepartMUSTNOTbespecifiedwhentheFREQrulepartissettoWEEKLY.

5.7.6 Byyeardayrulepart

The“ByYearDay”[BYYD]rulepartspecifiesacomma-separatedlistofdaysoftheyear.Validvaluesare1to366or-366to-1.Forexample,-1representsthelastdayoftheyear(December31st)and-306representsthe306thtothelastdayoftheyear(March1st).TheByYearDayrulepartMUSTNOTbespecifiedwhentheFREQrulepartissettoDAILY,WEEKLY,orMONTHLY.

5.7.7 Byweeknorulepart

The“ByWeekNo”[BYWN]rulepartspecifiesacomma-separatedlistofordinalsspecifyingweeksoftheyear.Validvaluesare1to53or-53to-1.ThiscorrespondstoweeksaccordingtoweeknumberingasdefinedinISO8601-1:2016.Aweekisdefinedasaseven-daytimeinterval,startingwithaMonday.Weeknumberoneofthecalendaryearisthefirstweekthatcontainsatleastfour(4)daysinthatcalendaryear.ThisrulepartMUSTNOTbeusedwhentheFREQrulepartissettoanythingotherthanYEARLY.Forexample,3representsthethirdweekoftheyear.

Note:Week53canonlyoccurwhenThursdayisJanuary1orifitisaleapyearandWednesdayisJanuary1.

5.7.8 Bymonthrulepart

The“ByMonth”[BYMO]rulepartspecifiesacomma-separatedlistofmonthsoftheyear.Validvaluesare1to12.

5.7.9 Multiple“Byrule”parts

IfmultipleByrulepartsarespecified,thenafterevaluatingthespecifiedFrequencyandTimeintervalruleparts,theByrulepartsareappliedtothecurrentsetofevaluatedoccurrencesinthefollowingorder:ByMonth,ByWeekNo,ByYearDay,ByMonthDay,ByDay,ByHour,ByMinuteandBySecond;thennumberofrecurrencesanddurationareevaluated.

5.7.10 ExampleofevaluatingmultipleByxxxruleparts

R/20150104T083000/PM15S00/FREQ=YR;INTR=2;BYMO=1;BYDA=SU;BYHO=8,9;BYMIN=30

First,the"INTR=2"wouldbeappliedto"FREQ=YR"andbeevaluatedas"everyotheryear".Then,"BYMO=1"wouldbeevaluatedas"everyJanuary,everyotheryear".Then,"BYDA=SU"wouldbeevaluatedas"everySundayinJanuary,everyotheryear".Then,"BYHO=8,9"wouldbeevaluatedas"everySundayinJanuaryat8AMand9AM,everyotheryear".Then,"BYMI=30"wouldbeevaluatedas"everySundayinJanuaryat8:30AMand9:30AM,everyotheryear".Then,lackinginformationfrom"RRULE",thesecondisderivedfrom"TimeintervalStart"value,toendupin"everySundayinJanuaryat8:30:00AMand9:30:00AM,everyotheryear".Similarly,iftheByMinute,ByHour,ByDay,ByMonthDay,orByMonthrulepartismissing,theappropriateminute,hour,day,ormonthwillberetrievedfromthe"TimeintervalStart"value.Finally,thetimeintervaldurationisdefinedbythe“Duration”value,whichinthiscaseis15minutes.

Page 19: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 13

5.8 Completerepresentations

Whentheapplicationidentifiestheneedforacompleterepresentationofarecurringtimeintervalwithrepeatrules,itshalluseanexpressioninaccordancewith5.2,combininganycompleterecurringtimeintervalrepresentationasdefinedinISO8601-1:2016,4.5.3withtherepeatrule.

Basicformat: Rn/YYYYMMDDThhmmss/YYYYMMDDThhmmss/FREQ=value;INTR=n Rn/YYYYMMDDThhmmss/PnnYnnMnnDTnnHnnMnnS/FREQ=value;INTR=n RnPnnYnnMnnDTnnHnnMnnS/YYYYMMDDThhmmss/FREQ=value;INTR=n Rn/PnnYnnMnnDTnnHnnMnnS/FREQ=value;INTR=n

Example: R12/20150929T140000/20150929T153000/FREQ=WE;INTR=2 R12/20150929T140000/P1H30M0S/FREQ=WE;INTR=2 R12/P2H30M0S/20150929T153000/FREQ=WE;INTR=2 R12/P2Y10M15DT10H30M20S/FREQ=WE;INTR=2

Extendedformat:Rn/YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss/FREQ=value;INTR=n Rn/YYYY-MM-DDThh:mm:ss/PnYnMnDTnHnMnS/FREQ=value;INTR=n Rn/PnnYnnMnnDTnnHnnMnnS/YYYY-MM-DDThh:mm:ss/FREQ=value;INTR=n

Example: R12/2015-09-29T14:00:00/2015-09-29T15:30:00/FREQ=WE;IINTR=2 R12/2015-09-29T14:00:00/P1H30M0S/FREQ=WE;INTR=2 R12/P1H30M0S/2015-09-29T15:30:00/FREQ=WE;INTR=2

5.9 Representationsotherthancomplete

Arepresentationotherthancompleteofarecurringtimeintervalwithrepeatruleshallbeanexpressioninaccordancewith5.1and5.2,wherethetimeintervalisrepresentedinaccordancewithISO8601-1:2016,4.4.5.

Page 20: Data elements and interchange formats — Information ...

ISO/WD8601-2

14 ©ISO2016–Allrightsreserved

AnnexA(normative)

EBNFnotation

The syntax used in this EBNF description is ISO/IEC 14977:1996 Rule: name = ... ; Terminal: '...' or "..." Non Terminal: ... Concatination: , Choice: | Optional: [...] Repetition (0 or more): {...} Repetition (1 or more): {...}- Repetition (n times): n * ... Grouping: (...) Exception: ...-... Special sequence: ?...? Comment: (*...*) (* Base definitions *) year = positiveYear | negativeYear | "0000" ; positiveYear = positiveDigit, digit, digit, digit | "0", positiveDigit, digit, digit | "00", positiveDigit, digit | "000", positiveDigit ; negativeYear = "-", positiveYear ; monthDay = ("01" | "03" | "05" |"07" |"08" |"10" |"12"), "-", OneThru31 | ("04" | "06" | "09" | "11"), "-", OneThru30 | "02-", OneThru29 ; yearMonth = year "-" month ; month = oneThru12 ; day = oneThru31 ; date = year | yearMonth | yearMonthDay ; oneThru12 = ("0", positiveDigit) | "10" | "11" | 12" ; oneThru29 = ("0", positiveDigit) | (("1" | "2"), digit) ; oneThru30 = OneThru29 | "30" ; oneThru31 = OneThru30 | "31" ; digit = positiveDigit | "0" ; positiveDigit = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;

Page 21: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 15

(* 4. Date and Time Extensions *) (* 4.1.1 Extended Format *) yearMonthDay = year, "-", monthDay ; (* 4.1.1 Levels *) (* For the extension features, two levels are defined: level 1 *) (* and level 2. Each major subsection of section 4 covers a *) (* general feature; some functions covered by that feature are *) (* level 1 and some are level 2. These levels are defined for *) (* the purpose of profiles, which may refer to the levels when *) (* specifying conformance to the profile. *) (* 4.2.1 Level 1 - Uncertain and/or Approximate Date *) uaDate = yearMonthDay, uaSymbol ; uaSymbol = "?" | "~" | "%" ; (* Reduced accuracy *) reducedDate = (year | yearMonth), uaSymbol ; (* 4.2.2 Level 2 - Uncertain and/or Approximate Date *) qualifiedDate = [uaSymbol], year, [uaSymbol], "-", [uaSymbol], month, [uaSymbol], "-", [uaSymbol], day, [uaSymbol] ; (* 4.3.1 Level 1 - Unspecified Date *) unspecifiedDate = (yearMonth, "-XX") | (year, "-XX-XX") | "XXXX-XX-XX" ; (* Reduced accuracy *) reduceAccuracyDate = (2 * digit, "XX") | (3 * digit, "X") | ("XXXX", ["-XX"]) | (year, "-XX") ; (* 4.3.2 Level 2 - Unspecified Date *) replacementDate = 4 * (digit | "X"), ["-", 2 * (digit | "X"), ["-", 2 * (digit | "X")]] ; (* 4.4.1 Level 1 - Before or After *) (* This feature is not used in level 1. *) (* 4.4.2 Level 2 - Before or After *) beforeAfterDate = ("..", year, ["-", month, ["-", day]]) | (year, ["-", month, ["-", day]], "..") ; (* 4.5.1 Level 1 - Enhanced Interval *)

Page 22: Data elements and interchange formats — Information ...

ISO/WD8601-2

16 ©ISO2016–Allrightsreserved

startEndOpenOrUnknown = [yearMonthDay],["*"],"/",["*"],[yearMonthDay] ; L1Interval = [year | yearMonth | yearMonthDay], [uaSymbol | "*"], "/", ["*"], [year | yearMonth | yearMonthDay], [uaSymbol] ; (* 4.5.2 Level 2 - Enhanced Interval *) L2Interval = [".."], (qualifiedDate | unspecifiedDate | replacementDate), "/", (qualifiedDate | unspecifiedDate | replacementDate ), [..] ; (* 4.6.1 Level 1 - Year Exceeding Four Digits *) longYear = "Y", ["-"], positiveDigit 4 * digit, {digit} ; (* 4.6.2 Level 2 - Year Exceeding Four Digits *) longYearScientific = "y", ["-"], positiveDigit, digit, "e" {digit}- ; (* 4.7.1 Level 1 - Significant Digits *) (* This feature is not used in level 1. *) (* 4.7.2 Level 2 - Significant Digits *) yearDate = (year | longYear | longYearScientific), "S", positiveDigit, {digit} ; (* 4.8.1 Level 1 Divisions of a year *) divisionL1 = year, divisionSet1; divisionSet1 = ("21" | "22" | "23" | "24") ; (* 4.8.2 Level 2 Divisions of a year *) divisionL2 = year, divisionSet2 ; divisionSet2 = (("2" | "3"), digit) | "40" | "41" ; (* 4.9.1 Level 1 - One of a Set *) (* This feature is not used in level 1. *) (* 4.9.2 Level 2 - One of a Set *) choiceList = "[", listContent "]" ; listContent = earlier, {",", listElement} | [earlier, ","], {listElement, ","}, later | listElement {"," listElement}- | consecutives ; listElement = date | qualifiedDate | unspecifiedDate | consecutives ; earlier = "..", date ; later = date ".." ; consecutives = yearMonthDay, "..", yearMonthDay

Page 23: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 17

| yearMonth, "..", yearMonth | year, "..", year ; (* 4.10.1 Level 1 - Multiple Dates *) (* This feature is not used in level 1. *) (* 4.10.2 Level 2 - Multiple Dates *) inclusiveList = "{" listContent "}" ; (* 4.11.1 Level 1 - Decade *) (* This feature is not used in level 1. *) (* 4.11.2 Level 2 - Decade *) decade = 3 * digit, ["~"] ; (* 5. Repeat Rules for Recurring Time Intervals *) (* All features in this section are defined at level 1 for the *) (* purpose of profiles, which may refer to the levels when *) (* specifying conformance to the profile. *) recurringIntervalWithRules = recurringInterval, "/", recurringRule ; recurringInterval = 'R', {integer}, '/', interval ; interval = intervalExplicit | intervalStart | intervalEnd | duration ; intervalExplicit = dateAndTime, '/', dateAndTime ; intervalStart = dateAndTime, '/', duration ; intervalEnd = duration, '/', dateAndTime ; duration = 'P', (durationTime | durationDate | durationWeek) ; durationDate = durationDay, [durationTime] ; durationTime = 'T', (durationHour | durationMinute | durationSecond) ; durationHour = hour, 'H', [durationMinute] ; durationMinute = minute, 'M', [durationSecond] ; durationSecond = second, 'S' ; durationDay = day, 'D' ; durationWeek = week, 'W' ; recurringRule = recurringRulePart, {';', recurringRulePart} ; recurringRulePart = ( ('FREQ', '=', freqency) | ('DIVI', '=', division)) | ( 'INTR', '=', digit {digit} ) | ( 'BYSE', '=', second )

Page 24: Data elements and interchange formats — Information ...

ISO/WD8601-2

18 ©ISO2016–Allrightsreserved

| ( 'BYMI', '=', minute ) | ( 'BYHR', '=', hour ) | ( 'BYDY', '=', byWeekDayList ) | ( 'BYMD', '=', byMonthDayList ) | ( 'BYYD', '=', byYearDayList ) | ( 'BYWN', '=', byweekNumberberList ) | ( 'BYMO', '=', byMonthList ) ; freqency = 'SE' | 'MI' | 'HR' | 'DY' | 'WE' | 'MO' | 'YR' ; division = divisionSet2 ; (* see 4.8.2 *) byWeekDayList = weekDayNumber, {',', weekDayNumber} ; weekDayNumber = [weekByNumber], weekDay ; weekDay = 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' ; byMonthDayList = monthDayNumber, {',', monthDayNumber} ; monthDayNumber = ["+" | "-"], monthDay ; byYearDayList = yearDayNumber, {',', yearDayNumber} ; yearDayNumber = ["+" | "-"], yearDay ; byweekNumberList = weekNumber, {',', weekNumber} ; weekByNumber = ["+" | "-"], weekNumber ; byMonthList = monthNumber, {',', monthNumber} ;

Page 25: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 19

AnnexB(normative)

ISO8601profiles

B.1 Statementoftheproblem

ISO 8601 includesmany features, and, inmany cases, several different formats to represent a singlefeature. Two vendors implementing 8601 may implement different features, or differentrepresentationsofagivenfeature,andtheirproductsmightnotinteroperate.Moreover,somefeatureshavemorethanoneinterpretationanddifferentvendorsmightselectdifferentinterpretation,makinginteroperabilityevenlesslikely.8601doesnotprovideguidelinestoaddresstheseconcerns,levelsofsupport, or conformance requirements. Each vendor is left to decide for itself what features,representation,andinterpretationstoimplement.

B.1.1 Somehistoricalbackground

The W3C defined date and time formats to begin to address these concerns:http://www.w3.org/TR/xmlschema-2/#isoformats. These formatsarebasedon8601,and theyhaveprovedinvaluablefortheinteroperabilityofWebdata.Theseformatshavetheirrootsinwhatwecalla“profile”ofISO8601:DateandTimeFormats.http://www.w3.org/TR/NOTE-datetimewhichstates

“Thisdocumentdefinesaprofileof ISO8601, the InternationalStandard for the representationofdatesandtimes.ISO8601describesalargenumberofdate/timeformats.Toreducethescopeforerrorandthecomplexityofsoftware,itisusefultorestrictthesupportedformatstoasmallnumber.Thisprofiledefinesafewdate/timeformats,likelytosatisfymostrequirements.

TheW3CNote,submittedin1997byReuters,wasneverendorsedbytheW3C,but itdidprovidetheoriginalimpetusforthedevelopmentoftheveryusefulandsuccessfulW3Cdateandtimeformats.

B.1.2 GeneralizingtheconceptofanISO8601profile

ThisdocumentattemptstoexpandandgeneralizetheconceptofanISO8601Profile.

AProfileof ISO8601 isa specificationdevelopedbyaparticularcommunitywhichexplainshowISO8601istobeused,tocarryoutaparticularfunctionorgroupoffunctionsrelevanttothatcommunity.

1. Itmaylistfeaturesof8601tobesupported.

2. In caseswhere therearemultiplemethods specified in8601 to supportaparticular function,theprofilemayselectasinglemethod.

3. Incaseswheretherearedifferentinterpretationsofaparticularfunction,theprofilemayselectasingleinterpretation,orprovideclarification.

4. Itmightlistfeaturesthatarenotrelevantandneednotbesupported.

5. Itmightspecifyseverallevelsofsupport.

Page 26: Data elements and interchange formats — Information ...

ISO/WD8601-2

20 ©ISO2016–Allrightsreserved

At minimum, a profile should state what an implementer must implement in order to claimconformance to the profile. If there are multiple levels specified, it should state conformancerequirementsforeachlevel.

Differentcommunitiesmaydefinedifferentprofiles.Infactanygivencommunitymaydefinemultipleprofiles. “Community” is used loosely tomean a groupwith a common interest in 8601. It is notintendedthat8601profilesbeapprovedbyanyformalbody;anypersonorcommunitycandevelopaprofile. There shouldhoweverbe auniquename for everyprofile so that itmaybe referenced. TheregistrationagencyforISO8601shouldregisterprofilesuponrequest,andhelptoassureuniquenessofnames. It is hoped that there will be mechanisms developed to provide interoperability betweenprofileshoweverthatisbeyondthescopeofthisdocument.

Thisdocumentprovidesone(draft)profile(section2),anditisexpectedthatadditionalprofileswillbedeveloped.

B.1.3 Multipleprofiles

Aproductmay implement several profiles.Herewe distinguish between static support and dynamicoperation.

B.1.3.1 StaticSupport

SupposeprofileXspecifiesfeaturesA,B,andC,andexcludesfeatureD.IfaproductclaimstosupportprofileX thatdoesnotmean that it cannot support featureD. Adifferentprofile –profileY –mightspecify features C, D, and E. And there is not, nor should there be, anything inherent in the profileconceptthatwouldprecludeaproductfromsupportingasmanyprofilesasitchoosestosupport.

B.1.3.2 DynamicOperation

Ontheotherhandsupposetherearetwocommunicationparties,P1andP2,exchangingISO8601data.P1usesaproductthatsupportsprofileX(only)whileP2usesaproductthatsupportsprofilesXandY.InorderforP1andP2tointeroperatetheymustoperateunderprofileX,becauseitistheonlyprofileincommonsupported.(ThusP2mustbeabletosuppressfeaturesexcludedbyP1.)

Theprocessbywhichtwocommunicatingpartiesagreetooperateaccordingtoaparticularprofileisacomplexareawhichneedsfurtherstudy.It isnotfullyaddressedbythisdocumentandistoacertainextendoutsidethescopeofthisdocument.Threepossibleapproaches:

1) SpecifiedbyProtocol.Theexchangeof ISO8601datamightbedoneunder thecontrolofaprotocol,whichcouldbeusedtonegotiateaparticularprofile.(8601itselfisadataformat,notaprotocol,andcouldnotbeadaptedtoaccomplishthistask.)

2) Specified by Format.Two parties might be exchanging data of a certain type, for examplebibliographicdata.Thedefinitionofthebibliographicformatcouldspecifythatdate/timedataconformtoaspecificprofile.

3) Specified by datatype. For exchange of date serialized into XML, or RDF (any RDFserialization),dateand timedatacancarry itsdatatype, forexamplexs:date,which,asnotedabove,correspondstotheW3Cprofile.

Page 27: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 21

AnnexC(informative)

TheExtendedDate/TimeFormat-AProfileofISO8601(Parts1and2)

C.1 Introduction

The Extended Date/Time Format (EDTF) profile of ISO 8601 was developed by the bibliographiccommunityalongwiththeparticipationofcommunitieswithrelatedinterests.

Thisprofilespecifiesthreelevels:level0,level1,andlevel2.Level0specifiesfeaturesofISO8601Part1.Levels1and2specifyfeaturesofPart2/level1andPart2/level2respectively.

C.1.1 Compliance

An implementation of this specification must support all of the features listed for Level 0, and thevendorshouldstateoneofthefollowing:

• Level0(only)issupported.• Level0issupportedandinadditionthefollowingfeaturesoflevels1and2aresupported(list

features).• Level1issupported.• Level 1 is supported and in addition the following features of level 2 are supported (list

features).• Level2issupported.

Twocommunicationpartiesthatagreetooperateaccordingtothisprofilemustsuppress,duringtheircommunication,anyISO8601featuresthatarenotincludedinlevel0.

C.1.2 Extendedformat

All features in this profile use extended format: hyphens separating date components and colonsseparatingtimecomponents.Basicformatisnotused.

C.1.3 Level0

Inorder to claimsupport for level0of thisprofile, an implementationmust supportdate (yearonly,year andmonth, andyear,month andday), date and time, time interval, and century, as specified in2.3.1-2.3.3

C.1.3.1 Date

Adatestringrepresentsoneofthefollowing:

• year,month,andday(e.g.2001-02-03)• yearandmonth(e.g.2008-12)• year(e.g.2008)

Yearmustbefourdigits.(Yearslongerthanfourdigitsarecoveredinlevels1and2.)

Page 28: Data elements and interchange formats — Information ...

ISO/WD8601-2

22 ©ISO2016–Allrightsreserved

A yearmay be positive, negative, or year zero. (This specification assumes astronomical numbering,whichincludestheyearzero.)

C.1.3.2 DateandTime

Adate/timestringiscomposedaccordingtooneofthreerepresentationsasillustratedinthefollowingthreeexamples:

• 2001-02-03T09:30:01• 2004-01-01T10:10:10Z• 2004-01-01T10:10:10+05:00

Zone-offsetmaybeomittedorincluded.Timezonedesignationconsistsofeithera'Z'toindicateUTC,ora'+'or'-'toindicate"aheadofUTC"or"behindUTC",followedbya2-digithour,followedoptionallybyacolonandthe2-digitminutes.

C.1.3.3 Timeinterval

Atimeinterval,asrepresentedbyastartdateandanenddate(separatedbyaforwardslash),isatimeintervalbeginningsometimeduringthestartdateandendingsometimeduringtheenddate.Theactualinstantsatwhichthetime intervalbeginsorendscanbenarroweddownonlytotheprecisionof thestartorenddate.Thestartandenddatesarebothasprescribedin2.3.1.Eitherendpointmaybeayear,year-month,oryear-month-day.Theendendpointmustbelaterthanorequaltothestartendpoint.

Examples

• 1964/2008Atimeintervalwithyearprecision,beginningsometimein1964andendingsometimein2008.

• 2004-06/2006-08A time intervalwithmonthprecision,beginning sometime in June2004andending sometime inAugustof2006.

• 2004-02-01/2005-02-08Atimeintervalwithdayprecision,beginningsometimeonFebruary1,2004andendingsometimeonFebruary8,2005.

• 2004-02-01/2005-02AtimeintervalbeginningsometimeonFebruary1,2004andendingsometimeinFebruary2005.Note that the start endpoint has different precision than the end endpoint (day/month) andthereforetheprecisionofthetimeintervalatlargeisundefined.

• 2004-02-01/2005AtimeintervalbeginningsometimeonFebruary1,2004andendingsometimein2005.Thestartendpoint has day precision and the end endpoint has year precision. Similar to the previousexample,theprecisionofthetimeintervalatlargeisundefined.

• 2005/2006-02Atimeintervalbeginningsometimein2005andendingsometimeinFebruary2006.

Atimeintervalrepresentsoneofthefollowing,dependingontheapplication:

a) Theperiodoftimerepresentedbythetimeinterval;b) Aspecificdateduringthattimeinterval,whenaneventoccurred.

Soforexample,thetimeinterval‘1956/1967’,dependingontheapplication,meanseither

a) Thetimeintervalbeginningsometimein1956andendingsometimein1967;or

Page 29: Data elements and interchange formats — Information ...

ISO/WD8601-2

©ISO2016–Allrightsreserved 23

b) Theeventinquestionoccurredduringoneoftheyears1956,1957,….,1967

andinthiscase,hasyearprecision.

Inasimilarsense, thetime interval ‘1956-01/1967-06’ hasmonthprecision,and ‘1956-01-15/1967-06-20’hasdayprecision.

C.1.3.4 Century

Twodigitsmaybeusedto indicatethecenturywhichisthehundredyeartimeinterval consistingofyearsbeginningwiththosetwodigits.

Forexample‘19’maybeusedtoindicatethetimeintervalrepresentedby‘1900/1999’.

Note:Forpurposesofthisprofile,a“century”isa100-yeartimeinterval.Forexample,‘1866/1965’isacentury.‘1900/1999’and‘1901/2000’arealsocenturies,andalthoughthelatterissometimesreferredtoasthe“18thcentury”,thisspecificationDOESNOTaddressnamedcenturiessuchasthe“18thcentury”nordoesittakeapositiononthemeaningofanamedcentury. Theprofileaddressescenturiesoftheformnn00/nn99only,where‘nn’isanytwo–digitnumber,forexample‘1900/1999’.

C.1.4 Level1

Level1ofthisprofilerequiressupportfor:

• Level0,and• allofthefeaturesofLevel1ofISO8601Part2,withtheexceptionofrecurringtimeintervals

(section5).

C.1.5 Level2

Level2ofthisprofilerequiressupportfor:

• Level1,(withtheexceptionofrecurringtimeintervals,section5)and• allofthefeaturesofLevel2ofISO8601Part2.

Page 30: Data elements and interchange formats — Information ...

ISO/WD8601-2

24 ©ISO2016–Allrightsreserved

Bibliography

[1] ISO80000-1:2009,Quantitiesandunits--Part1:General

[2] ISO80000-3:2006,Quantitiesandunits--Part3:Spaceandtime

[3] ISO/IEC646:1991,Informationtechnology—ISO7-bitcodedcharactersetforinformationinterchange

[4] ISO19018:2004,Shipsandmarinetechnology—Terms,abbreviations,graphicalsymbolsandconceptsonnavigation

[5] IEC60050-112:2010,InternationalElectrotechnicalVocabulary—Part112:Quantitiesandunits

[6] IEC60050-113:2011,InternationalElectrotechnicalVocabulary—Part113:Physicsforelectrotechnology

[7] IEC60050-114:2011,InternationalElectrotechnicalVocabulary—Part114:Electrochemistry

[8] IEC60050-713:1998,InternationalElectrotechnicalVocabulary—Part713:Radiocommunications:transmitters,receivers,networksandoperation

[9] Rec.ITU-RTF.460-6(2002-02),Standard-frequencyandtime-signalemissions

[10] ITU-TRecommendationS.1(1993),InternationalTelegraphAlphabetNo.2