Possible to define B.C. dates using xsd:dateTime?

Viewed 163

I'm developing a system to represent historical periods and milestones using OWL and knowledge graphs. Is it possible to use xsd:dateTime datatypes to represent B.C. dates such as the beginning of the Roman Empire?

2 Answers

You can represent a negative date with a minus sign, but there is confusion over what it means. XSD 1.0 adopted ISO 8601 but failed to notice that in ISO 8601 the year before 0001 is 0000 (which corresponds to the convention used by astronomers), whereas in the BC/AD calendar used by historians, the year before 1AD is 1BC. XSD 1.1 corrected this, so in 1.1 there is a year zero. Of course this only affects things if you calculate the interval between two dates.

The other thing to note is that that ISO 8601 uses the proleptic Gregorian calendar (misspelt in XSD 1.0 as "prolaptic"). This projects the current leap-year rules into the past rather than using the rules that were current at the time. (And of course it also uses modern convention such as starting the year on 1 January rather than 21 March). The ISO 8601 representation of a BC date doesn't correspond to the label that modern historians would use for the same date. (And it obviously doesn't correspond to the label used by people at the time - they didn't know when the Messiah was coming.)

So you can use negative ISO 8601 dates but you need to be aware that the rules for year zero, and for which years have a 29 February, might not be quite what you expect.

The spec says yes. (emphasis mine)

Note:
The date and time datatypes described in this recommendation were inspired by [ISO 8601]. '0001' is the lexical representation of the year 1 of the Common Era (1 CE, sometimes written "AD 1" or "1 AD"). There is no year 0, and '0000' is not a valid lexical representation. '-0001' is the lexical representation of the year 1 Before Common Era (1 BCE, sometimes written "1 BC").

Related