Page MenuHomePhabricator

[Task] Allow "speaking" values to specify the precision of a time value.
Open, HighPublic

Description

Currently, when calling the API, the precision ofa time value has to be specified using an obscure number, e.g. 8 for a decade or 0 for a gigayear. We should accept obvious string values for these, and map them to the internal numeric representation during deserialization of the JSON structure supplied to the API call. We'll want at least the following to work:

"gigayear" => 0,
"megayear" => 3,
"kiloyear => 6,
"century" => 7,
"decade" => 8,
"year" => 9,
"month" => 10,
"day" => 11,
"hour" => 12,
"minute" => 13,
"second" => 14,

Details

Reference
bz64593

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:14 AM
bzimport set Reference to bz64593.
bzimport added a subscriber: Unknown Object (MLST).

A "kiloyear" is usually called a "millennium".

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

The "speaking values" is usually divided in a "prefix" and a "unit", where the unit can be a base, derived, or composite unit. A composite unit is usually written as an expression of other units.

A gigayear is 10⁹ years, and a year is 31556925.445 seconds. The second is a SI unit, and the year is a non-SI unit.

Jonas set Security to None.
Jonas renamed this task from Allow "speaking" values to specify the precision of a time value. to [Task] Allow "speaking" values to specify the precision of a time value..Sep 10 2015, 7:36 PM
Jonas added a project: Technical-Debt.