Page MenuHomePhabricator

HH:MM:SS time in Wikidata (new datatype or display option for quantity datatype?)
Open, LowPublic

Description

Values like 1h20' and 1'20'' are currently entered as 1.33. It should possible to display/enter these as time values.

Options:

  • add option to change display for quantity datatype
  • define new datatype

This is independent from any time support for date-properties (called wikibase:TimeValue datatype).

Forum discussion:

Properties that could benefit from improved display:

Please merge this if there is already a ticket for it.

Event Timeline

Izno added a subscriber: Izno.

Actually, this is probably also the "business hours" use case.

This should not be related to T57755 as a date wouldn't be included.

thiemowmde added subscribers: thiemowmde, daniel.

This feature request is similar (if not the same) as the feature request for "feet and inches" as a unit for quantities. These are definitely quantities, but they use multiple units.

It's technically possible to use the existing quantity datatype for these: all you need is an item "feet and inches" that describes the concept, use that as the unit, and teach all relevant formatters and parsers (don't forget the parsers) how to deal with it.

So this is not a time- but a quantity-ticket, should be a sub-ticket of T77977, and is closely related to T77983.

Don't forget to include the time zone!

Don't forget to include the time zone!

The proposal is not for expressing time-of-day, it is to express a duration. Durations do not have time zones.

What if the duration is more than 24 hours? Should the quantity allow durations greater that 24 hours to be expressed as w days, x hours, y minutes, z seconds?

Ah, sorry, that wasn't clear! Although I suspect this might be better to solve in the general case, than to create a special case for one situation. Maybe that's better linked with things like foot/inches than datestamps, though.

The proposal is not for expressing time-of-day, it is to express a duration. Durations do not have time zones.

What if the duration is more than 24 hours? Should the quantity allow durations greater that 24 hours to be expressed as w days, x hours, y minutes, z seconds?

A format allowing for the inclusion of days would be useful for *very* long competitions, for example Self-Transcendence 3100 Mile Race, but my opinion is that these events are so exceedingly rare that it's not worth specifically catering for them (i.e. forcing them to use hours). I know a fair bit about footraces and I've never seen days in common use. Even runs up to 300 miles (very rare) are stored in hours. Other very long competitions, such as the Dakar Rally (50+ hours) are also generally stored in HH:MM:SS format.

I have been discussing known issues of this data type with the webmaster at Association of Road Racing Statisticians and he has raised a point about needing precision. For example, if only the hours are known rather than the seconds, then that "03:00:00" would be different from "03:00:00" measured to the second. I'm presuming we can cater for that distinction with a precision qualifier, rather than needing to account for that at base level?

On the point of precision, just read the detail at https://www.wikidata.org/wiki/Special:ListDatatypes#Time. If possible we will need precision up to a hundredth of a second (e.g. 800 metres world record is 1:40.91). Precision only up to tenths of a second (e.g. 9.2 seconds) is also a very common usage for historic hand-timed data - electronic timing only became more widespread from 1970 onwards.

To be complete, it might also be worth including optional precision of up to a one-thousandth of a second as well, used as the standard in the case of tiebreakers (for example see pjmorse's coment here). I don't think we will ever need greater than three decimal places worth of accuracy for athletics, though.