From HTML WG Wiki
Jump to: navigation, search

Datetime Value

Use cases

  • Including dates for calendar support
  • Including dates in documents that can be easily extracted, semantically analyzed and imported (such as through copy and paste or activation) into other applications
  • Including dates about historical events facilitating semantic analysis of one or many documents by comparable date
  • Allowing localized and culturally specific presentation of dates and times.


  • Proleptic Gregorian calendar (in particular Gregorian calendar dates prior to 0001-01-01)
    • XSD Datatypes suggest encoding all BC years by subtracting 1 from the BC year, reversing the sign, and encoding it as a ISO-8601 date (e.g., 5 BC becomes -0004 in ISO 8601). Note that this approach permits leap year rules to remain simple and drawn straight from ISO 8601.
    • An alternate approach might reduce authoring errors, but increase the complexity of leap year rules. That is to omit the representation year 0000 and simply convert a BC year to a negative integer (so 5 BC becomes -0005). Though this approach likely reduces authoring errors, it is complicates leap year rules since -00050229 does not exist according to the basic ISO 8601 leap year rules, but would exist for this approach. In this approach encoded year 0000 does not exist and would be an error when encountered.
  • Encoding alternate calendars
  • clarifying keyword "Gregorian" to unambiguously indicate a Gregorian calendar date.
  • Presentation of dates, times and date-times (perhaps with some CSS liaison)
  • Encoding of non-standard local times
  • Indication of calendar date within element contents
  • Representation of leap seconds (and the subsequent manipulation and comparison of dates and intervals including leap seconds whether represented or not)

Relevant Messages / Threads

(and a duplicate thread with other participants on whatwg)

See Also