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

Related Objects

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).
daniel created this task.Apr 29 2014, 10:34 AM

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

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
jeblad added a subscriber: jeblad.EditedMay 24 2015, 4:56 PM

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 updated the task description. (Show Details)Sep 10 2015, 7:35 PM
Jonas set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2015, 7:35 PM
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.
Jc3s5h added a subscriber: Jc3s5h.Mar 9 2016, 11:06 AM