Excerpt | ||
---|---|---|
| ||
I need to document different types of dates. |
There are many dates included in the ISO Metadata Standards and they have several different types - each with its own characteristics. This page has information about valid formats for those dates. Ron Lake's blog includes a helpful description of time in GML.
Date: gives values for year, month and day. Character encoding of a date is a string which shall follow the format for date specified by ISO 8601. A full date is formatted as YYYYMMDD or YYYY-MM-DD. This type is used in the following fields:
DateTime: combination of a date and a time type (given by an hour, minute and second). Character encoding of a DateTime shall follow ISO 8601. Combined dates and times should be formatted as YYYYMMDDThh:mm:ss, YYYYMMDDThhmmss, or YYYY-MM-DDThh:mm:ss. These representations include no TimeZone indicator, so they are assumed to be local time. YYYYMMDDThh:mm:ssZ would indicate universal time.
<gmd:dateTime> <gco:DateTime>2001-01-01T00:00:00</gco:DateTime> </gmd:dateTime>
Note: This element was incorrectly defined in the ISO 19139 nschema as an xs:dateTime. That type does not allow all of the ISO 8601 options. Specifically, it does not allow the specification of a time range. It will likely be deprecated in the revision of the standard and replaced with stepDateTime.
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Many datasets are collected continuously through time. In these cases, a clear publication date does not exist. This situation can be indicated by a combination of "inapplicable" for the citation date, a status code = onGoing, and an endPosition with indeterminatePosition=now:
<gmd:date> <gmd:CI_Date> <gmd:date gco:nilReason="inapplicable"/> <gmd:dateType> <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode> </gmd:dateType> </gmd:CI_Date> </gmd:date> ... <gmd:status> <gmd:MD_ProgressCode codeListValue="onGoing" codeList="http://www.isotc211.org/2005/resources /codeList.xml#MD_ProgressCode">onGoing</gmd:MD_ProgressCode> </gmd:status> ... <gmd:temporalElement> <gmd:EX_TemporalExtent id="boundingTemporalExtent"> <gmd:extent> <gml:TimePeriod gml:id="d1e50"> <gml:beginPosition>2003-01-18T00:23:00.000Z</gml:beginPosition> <gml:endPosition indeterminatePosition="now"/> </gml:TimePeriod> </gmd:extent> </gmd:EX_TemporalExtent> </gmd:temporalElement>
In some situations it is necessary to express a time in terms of a fixed period before the present. For example, on-going data processing systems might use observation sets and products from the previous day in the creation of a product for today. In these cases the duration and the end of the time period are known, so the XML looks like:
<gmd:temporalElement> <gmd:EX_TemporalExtent> <gmd:extent> <gml:TimePeriod gml:id="id"> <gml:duration>P1D</gml:duration> <gml:endPosition indeterminatePosition="now"/> </gml:TimePeriod> </gmd:extent> </gmd:EX_TemporalExtent> </gmd:temporalElement>
See ISO 8601 for information on durations.
The GML elements for describing time positions (beginPosition and endPosition) include the indeterminatePosition attribute that can have values of before, after, now, and unknown. This attribute can be used with a time value to express uncertain times. For example, a dataset that began sometime before 1980 and continues to the present could be described as:
<gmd:extent> <gml:TimePeriod gml:id="id"> <gml:beginPosition indeterminatePosition="before">1980</gml:beginPosition> <gml:endPosition indeterminatePosition="now"/> </gml:TimePeriod> </gmd:extent>
Hide comments |
---|