Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Except 7: time precision other than 9, 11 or 14 is unsupported wikidata #58

Closed
BaptisteBayche opened this issue Jun 21, 2024 · 1 comment

Comments

@BaptisteBayche
Copy link

Hi,

When I try to get a date with a precision level of 7, I encounter this error: 7: time precision other than 9, 11 or 14 is unsupported wikidata {'type': 'time', 'value': {'time': '+2000-00-00T00:00:00Z', 'timezone': 0, 'before': 0, 'after': 0, 'precision': 7, 'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'}}
(see https://www.wikidata.org/wiki/Q111534373 for this example)
This error occurs because precision level 7 is unsupported. However, is it possible to add support for precision 7 in datavalue.py?

I propose adding the following code at line 201:

if precision == 7:
  return int(time[1:3])

Thank you

@dahlia
Copy link
Owner

dahlia commented Jun 21, 2024

That's a good idea! If you open a pull request, I'm going to review it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants