maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
227 stars 24 forks source link

Default to Julian dates before 5 October 1582 #141

Closed Thunderforge closed 3 years ago

Thunderforge commented 3 years ago

When the Gregorian calendar was first introduced to replace the Julian calendar, Thursday 4 October 1582 was followed by Friday 15 October 1582. Therefore, we can safely assume that any date in this format before 5 October 1582 is in the Julian calendar and not the Gregorian calendar.

(Note that the final country to transition from the Julian calendar to the Gregorian calendar was Greece, with 15 Feb 1923 followed by 1 Mar 1923. Thus we can safely assume that any date 16 February 1923 or later is a Gregorian date. Any date in between could potentially be either calendar, depending on the country).

Since #78, it's possible to manually set the calendar to Julian, but I would like to see wikibase-cli default to the Julian calendar for all dates before 5 October 1582. This is the behavior of the web GUI of Wikidata, so we will be consistent.

maxlath commented 3 years ago

Should dates way in the past (ex: events somewhere between the big bang and 10000 years ago) also default to the Julian calendar?

Thunderforge commented 3 years ago

Good question about astronomical dates. I think we should match whatever the Wikidata web UI does. Speaking of which…

This Wikidata help article, says the following:

I decided to test this empirically as well and this does appear to be the behavior. Any date in 1582 or earlier (even after 5 October) defaults to Julian.

Screen Shot 2020-12-15 at 3 47 14 PM

While any date in 1583 or later defaults to Gregorian.

Screen Shot 2020-12-15 at 3 47 25 PM

I checked astronomical objects as well; Q2 Earth uses the Julian calendar for P571 inception. I also tried to add a new value to P571 and set it to 4540 million years BCE (the same value as Earth); I observed that the web UI defaults the calendar to Julian.

image

Therefore, it seems like the Wikidata web UI has the simple rule of "any date with a year of 1582 or earlier defaults to Julian", even for astronomical dates or days in 1582 that follow 5 October. I think wikibase-cli could do the same.

maxlath commented 3 years ago

that should now be the default behavior in v15.9.3