entering dates like '1987x' (or replace x with any character), one gets an error:
"Precision higher thay 'DAY' is not supported yet"
Version: unspecified
Severity: normal
entering dates like '1987x' (or replace x with any character), one gets an error:
"Precision higher thay 'DAY' is not supported yet"
Version: unspecified
Severity: normal
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Open | None | T66593 [Task] Allow "speaking" values to specify the precision of a time value. | ||
Resolved | None | T66558 Handle date formats like 1980x, 1980UTC, 'century' more consistently | ||
· · · |
this error occurs in the JS time validator (javascript/lib/time/time.Time.validate.js) in DataValuesJavaScript
however the problem is stuff like this
api.php?action=wbparsevalue&format=json&parser=time&values=1990x&options=%7B%7D
returns
precision: 14
if we want to support such value, then it should return max precision of a day (11)
or if we want to regard '1990x' as invalid, then do that.
currently on wikidata, it is regarded as invalid. We should probably stay consistent with that.
problem is in DateTimeParser
php's DateTime happily accepts '1990x' but throws exception with '1990xx'
Change 130138 had a related patch set uploaded by Aude:
Fix handling of dates in format such as 1980x
Change 130236 had a related patch set uploaded by Aude:
Handle localised dates (e.g. 'century') more consistently
Change 130138 merged by jenkins-bot:
Fix handling of dates in format such as 1980x or 1980UTC
Change 130416 had a related patch set uploaded by Aude:
Fix handling of dates in format such as 1980x or 1980UTC
Change 130416 merged by jenkins-bot:
Fix handling of dates in format such as 1980x or 1980UTC
Change 130236 merged by jenkins-bot:
Handle localised dates (e.g. 'century') more consistently
Change 130426 had a related patch set uploaded by Aude:
Handle localised dates (e.g. 'century') more consistently
Change 130426 merged by jenkins-bot:
Handle localised dates (e.g. 'century') more consistently
not really the same issue (this one is resolved), but bug 64545 and bug 64662 are still open.