-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathunits.toml
92 lines (82 loc) · 2.82 KB
/
units.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
default_system = "metric"
[si.prefixes]
kilo = ["kilo"]
hecto = ["hecto"]
deca = ["deca"]
deci = ["deci"]
centi = ["centi"]
milli = ["milli"]
[si.symbol_prefixes]
kilo = ["k"]
hecto = ["h"]
deca = ["da"]
deci = ["d"]
centi = ["c"]
milli = ["m"]
[fractions]
metric = false
imperial = true
[fractions.quantity]
time = false
temperature = false
[fractions.unit]
tsp = { max_whole = 5, max_denominator = 8 }
tbsp = { max_whole = 4, max_denominator = 3 }
lb = { max_denominator = 8 }
[[quantity]]
quantity = "volume"
best = { metric = ["ml", "l"], imperial = ["cup", "tsp", "tbsp"] }
[quantity.units]
metric = [
{ names = ["liter", "liters", "litre", "litres"], symbols = ["l", "L"], ratio = 1, expand_si = true },
]
imperial = [
{ names = ["teaspoon", "teaspoons"], symbols = ["tsp", "tsp."], ratio = 0.004_928_921 },
{ names = ["tablespoon", "tablespoons"], symbols = ["tbsp", "tbsp.", "tbs", "tbs."], ratio = 0.014_786_764 },
{ names = ["fluid ounce", "fluid ounces"], symbols = ["fl oz", "fl. oz.", "fl. oz", "fl oz."], ratio = 0.029_573_529 },
{ names = ["cup", "cups"], symbols = ["c"], ratio = 0.236_588_236 },
{ names = ["pint", "pints"], symbols = ["pt"], ratio = 0.473_176_473 },
{ names = ["quart", "quarts"], symbols = ["qt"], ratio = 0.946_352_946 },
{ names = ["gallon", "gallons"], symbols = ["gal"], ratio = 3.785_411_784 },
]
[[quantity]]
quantity = "length"
best = { metric = ["cm", "mm", "m"], imperial = ["in", "ft"] }
[quantity.units]
metric = [
{ names = ["meter", "meters", "metre", "metres"], symbols = ["m"], ratio = 1, expand_si = true },
]
imperial = [
{ names = ["foot", "feet"], symbols = ["ft", "'"], ratio = 0.3048 },
{ names = ["inch", "inches"], symbols = ["in", "\""], ratio = 0.0254 },
]
[[quantity]]
quantity = "mass"
best = { metric = ["mg", "g", "kg"], imperial = ["oz", "lb"] }
[quantity.units]
metric = [
{ names = ["gram", "grams"], symbols = ["g"], ratio = 1, expand_si = true },
]
imperial = [
{ names = ["ounce", "ounces"], symbols = ["oz", "oz."], ratio = 28.349_523_125 },
{ names = ["pound", "pounds"], symbols = ["lb", "lb."], ratio = 453.592_37 },
]
[[quantity]]
quantity = "time"
best = ["s", "h", "min", "d"]
units = [
{ names = ["second", "seconds"], symbols = ["s", "sec"], aliases = ["secs"], ratio = 1 },
{ names = ["minute", "minutes"], symbols = ["min"], aliases = ["mins"], ratio = 60 },
{ names = ["hour", "hours"], symbols = ["h"], ratio = 3600 },
{ names = ["day", "days"], symbols = ["d"], ratio = 86400 },
]
[[quantity]]
quantity = "temperature"
best = { metric = ["C"], imperial = ["F"] }
[quantity.units]
metric = [
{ names = ["celsius"], symbols = ["°C", "ºC", "℃", "C"], ratio = 1, difference = 273.15 },
]
imperial = [
{ names = ["fahrenheit"], symbols = ["°F", "ºF", "℉", "F"], ratio = 0.55555555556, difference = 459.67 }
]