Skip to content

Commit 9b5b28b

Browse files
committed
Import definitions.units from GNU units 2.17 with 13 new units.
1 parent c7deb4c commit 9b5b28b

File tree

7 files changed

+124
-50
lines changed

7 files changed

+124
-50
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
6.1: Jul 8, 2018
2+
----------------
3+
* Format time using commonyears + days + hh:mm:ss.sss s.
4+
* Import definitions.units from GNU units 2.17 with 13 new units.
5+
16
6.0: Mar 7, 2018
27
----------------
38
* Add @@ operator: similar to @, but returns the value of the resulting unit

debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
postgresql-unit (6.1-1) UNRELEASED; urgency=medium
2+
3+
* Format time using commonyears + days + hh:mm:ss.sss s.
4+
* Import definitions.units from GNU units 2.17 with 13 new units.
5+
6+
-- Christoph Berg <[email protected]> Sun, 08 Jul 2018 21:46:17 +0200
7+
18
postgresql-unit (6.0-1) unstable; urgency=medium
29

310
* Add @@ operator: similar to @, but returns the value of the resulting unit

definitions.units

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is the units database for use with GNU units, a units conversion
33
# program by Adrian Mariano [email protected]
44
#
5-
# October 2017 Version 2.19
5+
# June 2018 Version 2.20
66
#
77
# Copyright (C) 1996-2002, 2004-2017
88
# Free Software Foundation, Inc
@@ -2380,9 +2380,17 @@ split 200 ml
23802380
jeroboam 2 magnum
23812381
rehoboam 3 magnum
23822382
methuselah 4 magnum
2383+
imperialbottle 4 magnum
23832384
salmanazar 6 magnum
23842385
balthazar 8 magnum
23852386
nebuchadnezzar 10 magnum
2387+
solomon 12 magnum
2388+
melchior 12 magnum
2389+
sovereign 17.5 magnum
2390+
primat 18 magnum
2391+
goliath 18 magnum
2392+
melchizedek 20 magnum
2393+
midas 20 magnum
23862394

23872395
# The wine glass doesn't seem to have an official standard, but the same value
23882396
# is suggested by several organization.
@@ -3187,7 +3195,10 @@ cal_15 calorie_15
31873195
calorie_fifteen cal_15
31883196
calorie_20 4.18190 J # Energy to go from 19.5 to 20.5 degC
31893197
cal_20 calorie_20
3190-
calorie_twenty calorie_20
3198+
calorie_twenty calorie_20
3199+
calorie_4 4.204 J # Energy to go from 3.5 to 4.5 degC
3200+
cal_4 calorie_4
3201+
calorie_four calorie_4
31913202
cal_mean 4.19002 J # 1|100 energy to go from 0 to 100 degC
31923203
Calorie kilocalorie # the food Calorie
31933204
thermie 1e6 cal_15 # Heat required to raise the
@@ -3201,10 +3212,13 @@ britishthermalunit btu
32013212
btu_IT cal_IT lb degF / gram K
32023213
btu_th cal_th lb degF / gram K
32033214
btu_mean cal_mean lb degF / gram K
3215+
btu_15 cal_15 lb degF / gram K
3216+
btu_ISO 1055.06 J # Exact, rounded ISO definition based
3217+
# on the IT calorie
32043218
quad quadrillion btu
32053219

3206-
ECtherm 1.05506e8 J # Exact definition, close to 1e5 btu
3207-
UStherm 1.054804e8 J # Exact definition
3220+
ECtherm 1e5 btu_ISO # Exact definition
3221+
UStherm 1.054804e8 J # Exact definition,
32083222
therm UStherm
32093223

32103224
# Water latent heat from [23]
@@ -6357,6 +6371,9 @@ hogshead brhogshead
63576371
# U+2150- 1|7 For some reason these characters are getting
63586372
# U+2151- 1|9 flagged as invalid UTF8.
63596373
# U+2152- 1|10
6374+
#⅐- 1|7 # fails under MacOS
6375+
#⅑- 1|9 # fails under MacOS
6376+
#⅒- 1|10 # fails under MacOS
63606377
ℯ exp(1) # U+212F, base of natural log
63616378
µ- micro # micro sign U+00B5
63626379
μ- micro # small mu U+03BC
@@ -6398,10 +6415,10 @@ röntgen roentgen
63986415
₩ southkoreawon
63996416
₪ israelnewshekel
64006417
₤ lira
6401-
₺ turkeylira
6418+
# ₺ turkeylira # fails under MacOS
64026419
₨ rupee # unofficial legacy rupee sign
6403-
₹ indiarupee # official rupee sign
6404-
؋ afghanafghani
6420+
# ₹ indiarupee # official rupee sign # MacOS fail
6421+
#؋ afghanafghani # fails under MacOS
64056422
฿ thailandbaht
64066423
₡ elsalvadorcolon # Also costaricacolon
64076424
₣ francefranc
@@ -6412,13 +6429,13 @@ röntgen roentgen
64126429
₮ mongoliatugrik
64136430
₯ greecedrachma
64146431
₱ philippinepeso
6415-
₲ paraguayguarani
6416-
₴ ukrainehryvnia
6417-
₵ ghanacedi
6418-
₸ kazakhstantenge
6419-
₼ azerbaijanmanat
6420-
₽ russiaruble
6421-
₾ georgialari
6432+
# ₲ paraguayguarani # fails under MacOS
6433+
#₴ ukrainehryvnia # fails under MacOS
6434+
#₵ ghanacedi # fails under MacOS
6435+
#₸ kazakhstantenge # fails under MacOS
6436+
#₼ azerbaijanmanat # fails under MacOS
6437+
#₽ russiaruble # fails under MacOS
6438+
#₾ georgialari # fails under MacOS
64226439
﷼ iranrial
64236440
﹩ $
64246441
¢ ¢

definitions.units.patch

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- definitions.units 2017-11-28 20:17:13.021934545 +0100
2-
+++ definitions.units.patched 2017-11-28 20:18:05.570776490 +0100
1+
--- definitions.units
2+
+++ definitions.units.patched
33
@@ -196,7 +196,9 @@
44
US$ ! # The US dollar is chosen arbitrarily to be the primitive
55
# unit of money.
@@ -223,7 +223,7 @@
223223
gal gallon # the British wine gallon of 1707.
224224
quart 1|4 gallon # See the "winegallon" entry below
225225
pint 1|2 quart # more historical information.
226-
@@ -2768,7 +2780,7 @@
226+
@@ -2776,7 +2788,7 @@
227227

228228
number1can 10 usfloz
229229
number2can 19 usfloz
@@ -232,20 +232,22 @@
232232
number3can 4 uscups
233233
number5can 7 uscups
234234
number10can 105 usfloz
235-
@@ -3198,9 +3210,9 @@
235+
@@ -3209,10 +3221,10 @@
236236

237237
btu btu_IT # International Table BTU is the default
238238
britishthermalunit btu
239239
-btu_IT cal_IT lb degF / gram K
240240
-btu_th cal_th lb degF / gram K
241241
-btu_mean cal_mean lb degF / gram K
242+
-btu_15 cal_15 lb degF / gram K
242243
+btu_IT cal_IT lb (degF) / gram K
243244
+btu_th cal_th lb (degF) / gram K
244245
+btu_mean cal_mean lb (degF) / gram K
246+
+btu_15 cal_15 lb (degF) / gram K
247+
btu_ISO 1055.06 J # Exact, rounded ISO definition based
248+
# on the IT calorie
245249
quad quadrillion btu
246-
247-
ECtherm 1.05506e8 J # Exact definition, close to 1e5 btu
248-
@@ -3325,8 +3337,8 @@
250+
@@ -3339,8 +3351,8 @@
249251
# of coal used in the 1950's
250252
barreloil 5.8 Mbtu # Conventional value for barrel of crude
251253
# oil [E2]. Actual range is 5.6 - 6.3.
@@ -256,7 +258,7 @@
256258
naturalgas naturalgas_HHV # includes energy from condensation
257259
# combustion products. LHV is for Lower
258260
# Heating Value and excludes these.
259-
@@ -3361,7 +3373,7 @@
261+
@@ -3375,7 +3387,7 @@
260262

261263
# Celsius heat unit: energy to raise a pound of water 1 degC
262264

@@ -265,7 +267,7 @@
265267
chu celsiusheatunit
266268

267269
POWER watt
268-
@@ -3421,13 +3433,13 @@
270+
@@ -3435,13 +3447,13 @@
269271
Uvalue 1/Rvalue
270272
europeanUvalue watt / m^2 K
271273
RSI degC m^2 / W
@@ -281,7 +283,7 @@
281283

282284

283285
# The bel was defined by engineers of Bell Laboratories to describe the
284-
@@ -3801,7 +3813,7 @@
286+
@@ -3815,7 +3827,7 @@
285287
europeanpoint didotpoint # for the point used in Europe
286288
cicero 12 didotpoint
287289

@@ -290,7 +292,7 @@
290292

291293
# Type sizes
292294

293-
@@ -3858,8 +3870,8 @@
295+
@@ -3872,8 +3884,8 @@
294296

295297
INFORMATION bit
296298

@@ -301,7 +303,7 @@
301303
ban hartley # distributed random variable
302304
# over 10 symbols.
303305
dit hartley # from Decimal digIT
304-
@@ -3874,8 +3886,8 @@
306+
@@ -3888,8 +3900,8 @@
305307
# to symbols per second. Modern
306308
# modems transmit several bits
307309
# per symbol.
@@ -312,7 +314,7 @@
312314
# them do. But beware: for
313315
# transmission over modems, a
314316
# few extra bits are used so
315-
@@ -4230,7 +4242,7 @@
317+
@@ -4244,7 +4256,7 @@
316318
boardfeet boardfoot
317319
fbm boardfoot # feet board measure
318320
stack 4 yard^3 # British, used for firewood and coal [18]
@@ -321,7 +323,7 @@
321323
# sometimes called a face cord, but this
322324
# value is equal to 1|3 cord. Name
323325
# comes from an old Norse word for a
324-
@@ -5310,7 +5322,7 @@
326+
@@ -5324,7 +5336,7 @@
325327

326328
pa Pa
327329
ev eV
@@ -330,7 +332,7 @@
330332
oe Oe
331333
mh mH
332334
rd rod
333-
@@ -5543,7 +5555,8 @@
335+
@@ -5557,7 +5569,8 @@
334336
Mag Maz gravity # force
335337
Maz Volm kg / oldliter # mass based on water
336338

@@ -340,15 +342,15 @@
340342
Gf Grafut
341343
Sf Surf
342344
Vm Volm
343-
@@ -6294,7 +6307,6 @@
345+
@@ -6308,7 +6321,6 @@
344346
ton uston
345347
scruple apscruple
346348
fluidounce usfluidounce
347349
-gallon usgallon
348350
bushel usbushel
349351
quarter quarterweight
350352
cup uscup
351-
@@ -6380,7 +6392,7 @@
353+
@@ -6397,7 +6409,7 @@
352354
℈ scruple
353355
℥ ounce
354356
℔ lb

definitions.units.patched

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is the units database for use with GNU units, a units conversion
33
# program by Adrian Mariano [email protected]
44
#
5-
# October 2017 Version 2.19
5+
# June 2018 Version 2.20
66
#
77
# Copyright (C) 1996-2002, 2004-2017
88
# Free Software Foundation, Inc
@@ -2392,9 +2392,17 @@ split 200 ml
23922392
jeroboam 2 magnum
23932393
rehoboam 3 magnum
23942394
methuselah 4 magnum
2395+
imperialbottle 4 magnum
23952396
salmanazar 6 magnum
23962397
balthazar 8 magnum
23972398
nebuchadnezzar 10 magnum
2399+
solomon 12 magnum
2400+
melchior 12 magnum
2401+
sovereign 17.5 magnum
2402+
primat 18 magnum
2403+
goliath 18 magnum
2404+
melchizedek 20 magnum
2405+
midas 20 magnum
23982406

23992407
# The wine glass doesn't seem to have an official standard, but the same value
24002408
# is suggested by several organization.
@@ -3199,7 +3207,10 @@ cal_15 calorie_15
31993207
calorie_fifteen cal_15
32003208
calorie_20 4.18190 J # Energy to go from 19.5 to 20.5 degC
32013209
cal_20 calorie_20
3202-
calorie_twenty calorie_20
3210+
calorie_twenty calorie_20
3211+
calorie_4 4.204 J # Energy to go from 3.5 to 4.5 degC
3212+
cal_4 calorie_4
3213+
calorie_four calorie_4
32033214
cal_mean 4.19002 J # 1|100 energy to go from 0 to 100 degC
32043215
Calorie kilocalorie # the food Calorie
32053216
thermie 1e6 cal_15 # Heat required to raise the
@@ -3213,10 +3224,13 @@ britishthermalunit btu
32133224
btu_IT cal_IT lb (degF) / gram K
32143225
btu_th cal_th lb (degF) / gram K
32153226
btu_mean cal_mean lb (degF) / gram K
3227+
btu_15 cal_15 lb (degF) / gram K
3228+
btu_ISO 1055.06 J # Exact, rounded ISO definition based
3229+
# on the IT calorie
32163230
quad quadrillion btu
32173231

3218-
ECtherm 1.05506e8 J # Exact definition, close to 1e5 btu
3219-
UStherm 1.054804e8 J # Exact definition
3232+
ECtherm 1e5 btu_ISO # Exact definition
3233+
UStherm 1.054804e8 J # Exact definition,
32203234
therm UStherm
32213235

32223236
# Water latent heat from [23]
@@ -6369,6 +6383,9 @@ hogshead brhogshead
63696383
# U+2150- 1|7 For some reason these characters are getting
63706384
# U+2151- 1|9 flagged as invalid UTF8.
63716385
# U+2152- 1|10
6386+
#⅐- 1|7 # fails under MacOS
6387+
#⅑- 1|9 # fails under MacOS
6388+
#⅒- 1|10 # fails under MacOS
63726389
ℯ exp(1) # U+212F, base of natural log
63736390
µ- micro # micro sign U+00B5
63746391
μ- micro # small mu U+03BC
@@ -6410,10 +6427,10 @@ röntgen roentgen
64106427
₩ southkoreawon
64116428
₪ israelnewshekel
64126429
₤ lira
6413-
₺ turkeylira
6430+
# ₺ turkeylira # fails under MacOS
64146431
₨ rupee # unofficial legacy rupee sign
6415-
₹ indiarupee # official rupee sign
6416-
؋ afghanafghani
6432+
# ₹ indiarupee # official rupee sign # MacOS fail
6433+
#؋ afghanafghani # fails under MacOS
64176434
฿ thailandbaht
64186435
₡ elsalvadorcolon # Also costaricacolon
64196436
₣ francefranc
@@ -6424,13 +6441,13 @@ röntgen roentgen
64246441
₮ mongoliatugrik
64256442
₯ greecedrachma
64266443
₱ philippinepeso
6427-
₲ paraguayguarani
6428-
₴ ukrainehryvnia
6429-
₵ ghanacedi
6430-
₸ kazakhstantenge
6431-
₼ azerbaijanmanat
6432-
₽ russiaruble
6433-
₾ georgialari
6444+
# ₲ paraguayguarani # fails under MacOS
6445+
#₴ ukrainehryvnia # fails under MacOS
6446+
#₵ ghanacedi # fails under MacOS
6447+
#₸ kazakhstantenge # fails under MacOS
6448+
#₼ azerbaijanmanat # fails under MacOS
6449+
#₽ russiaruble # fails under MacOS
6450+
#₾ georgialari # fails under MacOS
64346451
﷼ iranrial
64356452
﹩ $
64366453
¢ ¢

0 commit comments

Comments
 (0)