In the wiki page "Units", there is one missing time unit, and entire missing unit entries for mass and digital storage. I have written the tables below in markdown syntax, so perhaps it will be easy to cut and paste into the wiki page.
Time
In the Time section, there should be an entry for milliseconds:
| Unit |
Phrases |
| Millisecond |
ms, millisecond, milliseconds |
Source code evidence:
|
{ |
|
id: Unit.TIME_ID, |
|
phrases: ['ms', 'millisecond', 'milliseconds'], |
|
plural: 'Milliseconds', |
|
ratio: 1e-3, |
|
singular: 'Millisecond', |
|
type: 'ms', |
|
}, |
Mass
There should be a section for Mass, with a table something like this:
| Unit |
Phrases |
| Gram |
gram, g, grams |
| Tonne |
tonne, tonnes |
| Kilogram |
kg, kilogram, kilograms |
| Milligram |
milligram, mg, milligrams |
| Microgram |
microgram, micrograms |
| Imperial ton |
imperialton |
| U.S. ton |
uston |
| Stone |
stone |
| Pound |
pound, pounds |
| Ounce |
ounce |
Source code evidence:
|
function setMassUnits(units: IUseUnit[]): void { |
|
units.push( |
|
...[ |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['gram', 'g', 'grams'], |
|
ratio: 1, |
|
type: 'gram', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['tonne', 'tonnes'], |
|
ratio: 1e6, |
|
type: 'tonne', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['kg', 'kilogram', 'kilograms'], |
|
ratio: 1000, |
|
type: 'kilogram', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['milligram', 'mg', 'milligrams'], |
|
ratio: 0.001, |
|
type: 'milligram', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['microgram', 'micrograms'], |
|
ratio: 1e-6, |
|
type: 'microgram', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['imperialton'], |
|
ratio: '1.016e+6', |
|
type: 'imperialton', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['uston'], |
|
ratio: '907185', |
|
type: 'uston', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['stone', 'stones'], |
|
ratio: '6350.29', |
|
type: 'stone', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['pound', 'pounds'], |
|
ratio: '453.592', |
|
type: 'pound', |
|
}, |
|
{ |
|
id: Unit.MASS_ID, |
|
phrases: ['ounce'], |
|
ratio: '28.3495', |
|
type: 'ounce', |
|
}, |
|
], |
|
); |
|
} |
Digital Storage Units
There should be a section for Digital Storage Units, with a table something like this:
| Unit |
Phrases |
| Bit |
bit |
| Kilobit |
kilobit, kB |
| Kibibit |
kibibit, kiB |
| Megabit |
megabit, mB |
| Mibibit |
mibibit, miB |
| Gigabit |
gigabit, gB |
| Gibibit |
gibibit, giB |
| Terabit |
terabit, tB |
| Tebibit |
tebibit, tiB |
| Petabit |
petabit, pB |
| Pebibit |
pebibit, piB |
| Byte |
byte, b |
| Kilobyte |
kilobyte, kb |
| Kibibyte |
kibibyte, kib |
| Megabyte |
megabyte, mb |
| Mibibyte |
mibibyte, mib |
| Gigabyte |
gigabyte, gb |
| Gibibyte |
gibibyte, gib |
| Terabyte |
terabyte, tb |
| Tebibyte |
tebibyte, tib |
| Petabyte |
petabyte, pb |
| Pebibyte |
pebibyte, pib |
Source code evidence:
|
function setDigitalStorageUnits(units: IUseUnit[]): void { |
|
units.push( |
|
...[ |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['bit'], |
|
ratio: 1, |
|
type: 'bit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['kilobit', 'kB'], |
|
ratio: 1000, |
|
type: 'kilobit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['kibibit', 'kiB'], |
|
ratio: 1024, |
|
type: 'kibibit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['megabit', 'mB'], |
|
ratio: 1e6, |
|
type: 'megabit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['mebibit', 'miB'], |
|
ratio: '1.049e+6', |
|
type: 'mebibit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['gigabit', 'gB'], |
|
ratio: 1e9, |
|
type: 'gigabit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['gibibit', 'giB'], |
|
ratio: '1.074e+9', |
|
type: 'gibibit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['terabit', 'tB'], |
|
ratio: 1e12, |
|
type: 'terabit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['tebibit', 'tiB'], |
|
ratio: '1.1e+12', |
|
type: 'tebibit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['petabit', 'pB'], |
|
ratio: 1e15, |
|
type: 'petabit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['pebibit', 'piB'], |
|
ratio: '1.126e+15', |
|
type: 'pebibit', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['byte', 'b'], |
|
ratio: 8, |
|
type: 'byte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['kilobyte', 'kb'], |
|
ratio: 8000, |
|
type: 'kilobyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['kibibyte', 'kib'], |
|
ratio: 8192, |
|
type: 'kibibyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['megabyte', 'mb'], |
|
ratio: 8e6, |
|
type: 'megabyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['mebibyte', 'mib'], |
|
ratio: '8.389e+6', |
|
type: 'mebibyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['gigabyte', 'gb'], |
|
ratio: 8e9, |
|
type: 'gigabyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['gibibyte', 'gib'], |
|
ratio: '8.59e+9', |
|
type: 'gibibyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['terabyte', 'tb'], |
|
ratio: 8e12, |
|
type: 'terabyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['tebibyte', 'tib'], |
|
ratio: '8.796e+12', |
|
type: 'tebibyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['petabyte', 'pb'], |
|
ratio: 8e15, |
|
type: 'petabyte', |
|
}, |
|
{ |
|
id: Unit.DIGITAL_ID, |
|
phrases: ['pebibyte', 'pib'], |
|
ratio: '9.007e+15', |
|
type: 'pebibyte', |
|
}, |
|
], |
|
); |
In the wiki page "Units", there is one missing time unit, and entire missing unit entries for mass and digital storage. I have written the tables below in markdown syntax, so perhaps it will be easy to cut and paste into the wiki page.
Time
In the Time section, there should be an entry for milliseconds:
Source code evidence:
fcal/src/default/units.ts
Lines 156 to 163 in c6c8f81
Mass
There should be a section for Mass, with a table something like this:
Source code evidence:
fcal/src/default/units.ts
Lines 236 to 301 in c6c8f81
Digital Storage Units
There should be a section for Digital Storage Units, with a table something like this:
Source code evidence:
fcal/src/default/units.ts
Lines 303 to 439 in c6c8f81