| thiemowmde added a comment. |
I don't know the current implementation, but I know how the datatype is meant to be used: Values that are outside of the precision should not be compared. For example, when comparing 2010-00-00 to 2010-01-01, where both have the precision "year", the comparison should not take the month and the day into account. The two should be considered equal.
When comparing 2010-00-00 (precision is "year") to 2010-01-00 ("month"), a standard-conform comparison algorithm might work as follows:
- Pick the more precise precision, in this case "month".
- Cut off both values at this precision (that is, ignore everything that is more precise). This results in 2010-00 and 2010-01.
- Set month and day to 1, if they are zero. This results in 2010-01 for both.
- Now do the comparison.
This is just one, but not the only way to do such a comparison. If it's "correct" or not is up to you and your use cases. The Wikibase software itself does not implement such an algorithm.
Also see T123888#3818453.
TASK DETAIL
EMAIL PREFERENCES
To: Xqt, thiemowmde
Cc: thiemowmde, Lokal_Profil, gerritbot, Xqt, Wesalius, Aklapper, pywikibot-bugs-list, Multichill, Baloch007, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy
Cc: thiemowmde, Lokal_Profil, gerritbot, Xqt, Wesalius, Aklapper, pywikibot-bugs-list, Multichill, Baloch007, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
