thiemowmde added a comment.

1. The timestamp is stored in the **calendar model** indicated by the URI and 
not converted to Gregorian. This decision was made in May 2013 and finally 
realized in the UI in 2014. The tragedy is: Most edits in Wikidata are done via 
the API and we can't say if a Julian date is correct by looking at the time it 
was entered. It could be that it was entered incorrectly before the switch and 
is correct now. On the other hand there are bots and scripts out there that 
still incorrectly convert Julian dates to Gregorian. This can only be fixed 
gradually by telling all bot and script developers and by re-checking all 
Julian dates.
2. The timestamp is not **ISO** compliant. This was not the intention. The 
intention was to have a commonly understood, both human- and machine-readable 
YMD-ordered format that's independent from the language. We will avoid the word 
"ISO" in the future. I already started submitting patches for that (see 
https://gerrit.wikimedia.org/r/#/c/190257/).
3. Gregorian and Julian dates use the same **format**. This allows to reuse the 
same formatters, parsers and validators. This must change in the future when we 
introduce other calendar models.
4. The year is **padded** to have between 1 and 16 digits. There is no further 
guarantee. Even my suggested minimum of 4 digits (see 
https://github.com/DataValues/Time/pull/33) does not change that because it 
does not touch existing dates in the database.
5. Month and day being **zero** indicate that they are unknown/undefined/not 
set. This makes it possible to roundtrip timestamps like "2015-00-00". Users 
can copy-paste this and the parser will correctly detect "2015" with the 
precision set to "1 year". The alternative is to store "2015-01-01", which will 
be incorrectly detected as "1 January 2015" with a precision of "1 day". The 
disadvantage of storing "2015-00-00" is that it's not ISO compliant and can 
confuse external parsers, e.g. PHP's parser will convert this to "2014-11-30". 
Both disadvantages are not relevant. Relying solely on PHP's parser is not 
possible anyway because it can not deal with, for example, 5-digit years.


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

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

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

To: thiemowmde
Cc: Tobi_WMDE_SW, gerritbot, Jc3s5h, JulesWinnfield-hu, thiemowmde, daniel, 
Aklapper, Lydia_Pintscher, Wikidata-bugs, Jdouglas, aude



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to