Jc3s5h added a comment.

In https://phabricator.wikimedia.org/T99795#1419479, @Smalyshev wrote:

> Year zero doesn't make sense for Wikidata because 1BCE is stored as -1, so 
> what 0 would be? I don't see any actual year to be represented by it. If 
> storage format changes then we'll need to change it, but then we'd also have 
> to change all BCE dates.


The data model says 1 BCE is indeed stored as 0, The user interface, in 
defiance of the data model, would store a date entered as 1 BCE as -1. But an 
entry made with the API would not necessarily have done so. The current 
contents of the database are mixed, unreliable, and are unfit to be converted. 
Any approach that depends on converting anything should be postponed until the 
contents of the database is scrubbed.

> If you need beginning of the October, then you need day precision. If you say 
> month precision, you don't know if it's beginning, end or middle of October, 
> thus you can not compare it with, say, October 1 or October 15.


I don't think people would want to take the approach that "15 November 1582 
Gregorian" and "November 1582 Gregorian" are entirely different kinds of things 
that cannot be compared, just like the proverbial apples and oranges cannot be 
compared. If I make a query asking for everyone born between March and December 
1582 Gregorian, should the query ignore a guy born on 15 November 1582 
Gregorian because that date is day precision, and my query is month precision, 
and day precision cannot be compared to month precision?

Handling queries on dates that include precision expressions requires some 
careful thought and a lot of arithmetic. Essentially, you have to find the 
earliest and latest instant for the query, then the earliest and latest instant 
for the items, and see if any part of the range for the item falls within the 
range for the query.


TASK DETAIL
  https://phabricator.wikimedia.org/T99795

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jc3s5h
Cc: gerritbot, Liuxinyu970226, Jc3s5h, Smalyshev, Aklapper, daniel, jkroll, 
Wikidata-bugs, Jdouglas, aude, Manybubbles, JanZerebecki, Malyacko, P.Copp



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to