Page MenuHomePhabricator

Documentation of year 0 and negative years
Closed, DuplicatePublic

Description

We are currently following XSD 1.0:

  • The year 1 BC is stored as -1, and so on.
  • We do not disallow the year 0 on purpose, e.g. to be able to quote sources that talk about a year 0. Users of the data can decide if the year 0 is an error or identical to -1. This depends on the context the data is used in.

XSD 1.1 changes the meaning of the year 0 and negative years. http://www.w3.org/TR/xmlschema11-2/#dateTime We currently do not follow this standard.

Event Timeline

thiemowmde raised the priority of this task from to Medium.
thiemowmde updated the task description. (Show Details)
thiemowmde added projects: Wikidata, DataValues.
thiemowmde subscribed.

This is described as documentation. But isn't there some part of Wikidata that parses input and stores it in some unstated format? Isn't there some other part of Wikidata that parses the stored format and output it in what seems to be the canonical output format, JSON?

The documentation on the JSON format seems to be at https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikibase/master/docs%2Fjson.wiki

This says the JSON format resembles ISO 8601. Since ISO 8601 considers 0000 to be equal to 1 BC, could someone point out the documentation that says otherwise?

ISO 8601:2004_E states

--calendar year is, unless specified otherwise, represented by four digits. Calendar years are numbered in
ascending order according to the Gregorian calendar by values in the range [0000] to [9999]. Values in
the range [0000] through [1582] shall only be used by mutual agreement of the partners in information
interchange."

That version also indicates negative years are acceptable by mutual agreement, and that 0000 is a leap year in the proleptic Gregorian calendar. If 1 BC were designated -0001, that would be the year that's a leap year, but since 0000 is the leap year, -0001 must correspond to 2 BC.