thiemowmde added a comment.

The +0019 example is irrelevant for what we do.

Code that does `string.sub(d, 9, 18)` is just wrong, no matter how you look at 
it, and can't be of any relevance for what we do. Think about it. What does it 
do if it processes the value `-00000042000-01-01T00:00:00Z`. It extracts 
"2000-01-01". Fail.

Writing a proper parser is as trivial as it can be: 
`/^[-+](\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)/`. We guarantee there will always be 
a sign character, we guarantee there will always be separation characters (`-`, 
`T` and `:`). We do **not** guarantee the time zone "Z" will always be there. 
We may support different time zones in the future. And we do **not** guarantee 
the year will always have the same fixed number of digits. We currently try to 
pad everything to 16 digits but we **can't** guarantee. This is not how 
Wikibase works.


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

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: thiemowmde, Jc3s5h, Wikidata-bugs, Nemo_bis, Addshore, MZMcBride, 
Lydia_Pintscher, JohnLewis, aude



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

Reply via email to