maxlath / wikibase-cli

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

Writing Time/Date to WD Records #52

Closed scottythered closed 6 years ago

scottythered commented 6 years ago

I'm running into some issues adding claims with time/date data.

For example, wd ac Q50278901 P580 "1983" will result in writing "time": "+1983-00-00T00:00:00Z" to the WD record, but WD will not accept YYYY-MM-DD -- or any variations of it -- as a date format:

image

maxlath commented 6 years ago

weird, I can't reproduce the issue, all the following commands should pass:

wd ac Q4115189 P580 "1983"
wd ac Q4115189 P580 "1983-02"
wd ac Q4115189 P580 "1983-02-23"

which version of wikidata-cli and wikidata-edit (in wikidata-cli node_modules folder) are you using?

wd --version
cat path/to/wikidata-cli/node_modules/wikidata-edit/package.json | grep 'version":'
scottythered commented 6 years ago

wd: 4.19.1 wikidata-edit: 1.9.0

maxlath commented 6 years ago

aaah ok, wd accepts month or day precision only since v5.0.0 :) can you try to update and confirm that it solves the issue?

scottythered commented 6 years ago

Hahaha well that was fixed fast!

scottythered commented 6 years ago

Love this program, by the way

maxlath commented 6 years ago

thank you :D