#585 Measures: an official library of formats by type; no plugin formats
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#585
- issue
- state:closed
Follow-up to #570 and #573. **Decided:** measures are printed and parsed by an **official library of formats**, as times are by the time presentations (Gregorian and the others). Plugins never provide measure formats. Each format depends on the measure's type: | Type | Formats | | --- | --- | | `mpq` | Floating point (significant digits), scientific notation, engineering notation (exponents in multiples of three), improper fractions (`7/2`) | | `mpz` | Fixed decimal values, such as currency (`$1,234.56` for 123456 cents) | - **Shared options:** every format keeps the existing scale (shown = stored × scale), prefix and unit. - **Exact both ways:** formats print and parse exactly, and refuse what they would have to round. - **Replaced:** the current modes `exact`, `fixed`, `decimal`, `scientific` and `si` give way to this set, tied to the type. A declaration whose format doesn't fit its type is refused. - **Changing type:** widening `mpz` to `mpq` also chooses an `mpq` format. https://github.com/circagraph/timeline-app/issues/585
Related
- #570 Measures: typed quantities on moments and durations, totalled in every summary
- #573 Measures 2: presentation and parsing per measure, with editor fields
- #590 Measures: an official library of formats by type (#585)
- Merge pull request #590 from openchronology/feat/585-measure-formats
- Measures: an official library of formats by type (#585)
Open #585 Measures: an official library of formats by type; no plugin formats in the timeline