Page MenuHomePhabricator

Wikibase date datatype: default value of the "after" parameter
Open, Needs TriagePublic

Description

The Wikibase date datatype has a notion of precision, and also a lesser known notion of upper and lower bounds expressed as integer multiples of this precision.

For instance, the following data value represents the current day in UTC:
Timestamp +2018-05-17T00:00:00Z
Timezone +00:00
Calendar Gregorian
Precision 1 day
Before 0
After 1

(meaning that it starts at the beginning of 2018-05-17, midnight, and continues until the next day)

When creating a claim with a date value in the Wikibase UI, by default the "After" parameter is set to 0 (see this example). Is it intentional? I believe that 1 should be the default value there (regardless of the precision).

If this is indeed a bug, should we run a bot to fix all the date values?
If this is not a bug, then there is a bug in Wikidata-Toolkit, which agrees with my interpretation of the default value:
https://github.com/Wikidata/Wikidata-Toolkit/blob/297160438fecb86e7b86ae05cee3c46eae44797d/wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/interfaces/TimeValue.java
(except that there is a typo there: before-tolerance should obviously be after-tolerance in the last comment)

Event Timeline

Pintoch updated the task description. (Show Details)
Pintoch added a project: Wikibase-DataModel.

After discussion with @Tpt, for now we are just going to change Wikidata-Toolkit's behaviour to use 0 in the After parameter as well… but that's just because it's really hard to shift the default now.

Vvjjkkii renamed this task from Wikibase date datatype: default value of the "after" parameter to aucaaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from aucaaaaaaa to Wikibase date datatype: default value of the "after" parameter.Jul 2 2018, 4:05 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.