University of British Columbia, Vancouver, BC, Canada
Conference Agenda
Overview and details of the sessions of this conference. Please select a date or location to show only sessions at that day or location. Please select a single session for detailed view (with abstracts and downloads if available).
ID: 145 / D1 Short Papers: 5 Short Paper Keywords: TEI, dates and times, ISO 8601
Formal expression of dates & times in TEI
S. Bauman
Northeastern University Digital Scholarship Group, United States of America
We are all familiar with the date format used on @when: YYYY-MM-DD. It originated in ISO 2014 (published 1976-04) which was superseded by ISO 8601 (published 1988-06).¹ P5 provides three sets of attributes for recording a formal representation of a temporal expression: 1) @when and friends (@notBefore, @notAfter, @from, & @to from att.datable.w3c), 2) @when-iso and friends (@when-iso, @notBefore-iso, @notAfter-iso, @from-iso, & @to-iso from att.datable.iso), and 3) @when-custom and friends. The first set allows users to record a limited set of temporal expressions using the formats supported by the W3C, which are a subset of ISO 8601:2004. While not the main focus of this presentation, some time will be spent discussing their advantages & disadvantages. (The main disadvantage is that these formats are quite limiting, e.g., there is no way to express a time precise only to the hour or minute — all times must be precise to the second (or decimal fraction thereof). The enormous advantage of these formats is they are already supported by various computer systems, XSLT and XQuery processors in particular.) The second set allows users to record a somewhat less limited set of temporal expressions using the formats supported by ISO 8601:2004. Some of these formats are unavailable via att.datable.w3c, but may still be useful; e.g. imprecise times, decimal fractions of less precise units, and recurring time intervals. However, these values cannot be handled easily by XPath; in fact, this author is not aware of any out-of-the-box software that will know how to handle these values. The third set allows users to record temporal expressions however they like, and is mentioned here only for completeness. Since P5 was published ISO 8601 has gotten a major overhaul, published in two parts in 2019. ISO 8601:2019, apparently based heavily on the US Library of Congress “Extended Date/Time Format”,² allows formal representation of quite a few types of temporal expression that TEI encoders might find quite useful. E.g., expression of uncertainty or approximation (or both), disjunction, and conjunction. But again, there is little to no software support for these formats. This presentation will
present some of the capabilities of ISO 8601:2019;
point users to a profile of ISO 8601:2019 with detailed examples intended for a DH audience;³
argue that it is high time for TEI to update @when-iso (and friends) such that they are based on 8601:2019 rather than 8601:2004;
suggest a method for allowing users to say “no, I will stick to ISO 8601:2004” in their customization files; and
(if sufficient time remaining) demonstrate code for validation of attribute values that (are supposed to) conform to the profile that was presented.
Notes ¹ P1 referred only to ISO 2014; P2 refers to both of them a bit schizophrenically; P3 & P4 still have ISO 2014 in the bibliography, but do not actually refer to it; P5 does not mention ISO 2014. ² https://www.loc.gov/standards/datetime/ ³ Yes, a bit of self-promotion, here: https://github.com/NEU-DSG/wwp-public-code-share/tree/main/docs/dates_and_times_in_DH