Page MenuHomePhabricator

Support more fine-grained date fields than xsd:dateTime
Closed, DeclinedPublic

Description

Currently, we export all dates as xsd:dateTime. It may be better to TimeValue's precision setting and use xsd:date, xsd:gYearMonth, xsd:gYear, etc.

Event Timeline

Smalyshev claimed this task.
Smalyshev raised the priority of this task from to Low.
Smalyshev updated the task description. (Show Details)
Smalyshev added a subscriber: Smalyshev.

We may also want to support xsd:gMonthDay in order to serve queries such as "who was born on November 15th" and support year-less dates (see T94064).

Lydia_Pintscher renamed this task from Support more fine-grained date fields that xsd:dateTime to Support more fine-grained date fields than xsd:dateTime.Mar 30 2015, 1:01 PM

We may also want to support xsd:gMonthDay

In queries? Sure. But probably not in the data model. Note that this would need a new datatype and can not be a precision value for the existing datatype, similar to T110647: [Bug] Invalid TimeValues YYYY-00-DD w/o month are accepted, which was a bug.

Note that this would need a new datatype

Yes, most likely, since "December 25th" is not the date. OTOH, if you want to record something like "on which day Christmas is celebrated", you can't really use a date.

Also, right now querying for something like birthday (without a year) is extremely expensive, since you have to apply functions to dates. Having month-day type and corresponding property would make querying birthdays very easy.

Gehel added a subscriber: Gehel.

Closing this as it is unclear if we still need this feature. This looks more like a design question from the start of the project. Feel free to re-open as needed.

The question was: A lot of time values in the Wikidata database name a year only. Does it even make sense to export these as xsd:dateTime? Shouldn't we export these as xsd:gYear?