From 8236d922188be210efb379bfd1b6e2c4e548501f Mon Sep 17 00:00:00 2001 From: Shea Martin Date: Thu, 20 Jun 2019 17:34:20 -0600 Subject: [PATCH 1/2] Add support for Imperial Gallons, and Barrels (US Beer, Imperial Beer, Oil) --- build/quantities.esm.js | 4 ++++ build/quantities.js | 4 ++++ src/quantities/definitions.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/build/quantities.esm.js b/build/quantities.esm.js index 02ab438..21b64cc 100644 --- a/build/quantities.esm.js +++ b/build/quantities.esm.js @@ -271,6 +271,7 @@ var UNITS = { /* volume */ "" : [["l","L","liter","liters","litre","litres"], 0.001, "volume", ["","",""]], "": [["gal","gallon","gallons"], 0.0037854118, "volume", ["","",""]], + "": [["galimp","gallon-imp","gallons-imp"], 0.0045460900, "volume", ["","",""]], "": [["qt","quart","quarts"], 0.00094635295, "volume", ["","",""]], "": [["pt","pint","pints"], 0.000473176475, "volume", ["","",""]], "": [["cu","cup","cups"], 0.000236588238, "volume", ["","",""]], @@ -278,6 +279,9 @@ var UNITS = { "": [["tb","tbsp","tbs","tablespoon","tablespoons"], 1.47867648e-5, "volume", ["","",""]], "": [["tsp","teaspoon","teaspoons"], 4.92892161e-6, "volume", ["","",""]], "": [["bu","bsh","bushel","bushels"], 0.035239072, "volume", ["","",""]], + "": [["bbl","oil-barrel","oil-barrels"], 0.158987294928, "volume", ["","",""]], + "": [["bl","bl-us","beer-barrel","beer-barrels"], 0.1173477658, "volume", ["","",""]], + "": [["blimp","bl-imp","beer-barrel-imp","beer-barrels-imp"], 0.16365924, "volume", ["","",""]], /* speed */ "" : [["kph"], 0.277777778, "speed", [""], [""]], diff --git a/build/quantities.js b/build/quantities.js index c180cf0..1310712 100644 --- a/build/quantities.js +++ b/build/quantities.js @@ -277,6 +277,7 @@ SOFTWARE. /* volume */ "" : [["l","L","liter","liters","litre","litres"], 0.001, "volume", ["","",""]], "": [["gal","gallon","gallons"], 0.0037854118, "volume", ["","",""]], + "": [["galimp","gallon-imp","gallons-imp"], 0.0045460900, "volume", ["","",""]], "": [["qt","quart","quarts"], 0.00094635295, "volume", ["","",""]], "": [["pt","pint","pints"], 0.000473176475, "volume", ["","",""]], "": [["cu","cup","cups"], 0.000236588238, "volume", ["","",""]], @@ -284,6 +285,9 @@ SOFTWARE. "": [["tb","tbsp","tbs","tablespoon","tablespoons"], 1.47867648e-5, "volume", ["","",""]], "": [["tsp","teaspoon","teaspoons"], 4.92892161e-6, "volume", ["","",""]], "": [["bu","bsh","bushel","bushels"], 0.035239072, "volume", ["","",""]], + "": [["bbl","oil-barrel","oil-barrels"], 0.158987294928, "volume", ["","",""]], + "": [["bl","bl-us","beer-barrel","beer-barrels"], 0.1173477658, "volume", ["","",""]], + "": [["blimp","bl-imp","beer-barrel-imp","beer-barrels-imp"], 0.16365924, "volume", ["","",""]], /* speed */ "" : [["kph"], 0.277777778, "speed", [""], [""]], diff --git a/src/quantities/definitions.js b/src/quantities/definitions.js index 2e42440..2042c62 100644 --- a/src/quantities/definitions.js +++ b/src/quantities/definitions.js @@ -84,6 +84,7 @@ export var UNITS = { /* volume */ "" : [["l","L","liter","liters","litre","litres"], 0.001, "volume", ["","",""]], "": [["gal","gallon","gallons"], 0.0037854118, "volume", ["","",""]], + "": [["galimp","gallon-imp","gallons-imp"], 0.0045460900, "volume", ["","",""]], "": [["qt","quart","quarts"], 0.00094635295, "volume", ["","",""]], "": [["pt","pint","pints"], 0.000473176475, "volume", ["","",""]], "": [["cu","cup","cups"], 0.000236588238, "volume", ["","",""]], @@ -91,6 +92,9 @@ export var UNITS = { "": [["tb","tbsp","tbs","tablespoon","tablespoons"], 1.47867648e-5, "volume", ["","",""]], "": [["tsp","teaspoon","teaspoons"], 4.92892161e-6, "volume", ["","",""]], "": [["bu","bsh","bushel","bushels"], 0.035239072, "volume", ["","",""]], + "": [["bbl","oil-barrel","oil-barrels"], 0.158987294928, "volume", ["","",""]], + "": [["bl","bl-us","beer-barrel","beer-barrels"], 0.1173477658, "volume", ["","",""]], + "": [["blimp","bl-imp","beer-barrel-imp","beer-barrels-imp"], 0.16365924, "volume", ["","",""]], /* speed */ "" : [["kph"], 0.277777778, "speed", [""], [""]], From a40cded5ee9b300eb27726e8d007ad574afe8436 Mon Sep 17 00:00:00 2001 From: Shea Martin Date: Fri, 21 Jun 2019 09:49:59 -0600 Subject: [PATCH 2/2] Add support for imperial version of fluid ounces and pints. --- build/quantities.esm.js | 2 ++ build/quantities.js | 2 ++ src/quantities/definitions.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/build/quantities.esm.js b/build/quantities.esm.js index 21b64cc..d8692b9 100644 --- a/build/quantities.esm.js +++ b/build/quantities.esm.js @@ -274,8 +274,10 @@ var UNITS = { "": [["galimp","gallon-imp","gallons-imp"], 0.0045460900, "volume", ["","",""]], "": [["qt","quart","quarts"], 0.00094635295, "volume", ["","",""]], "": [["pt","pint","pints"], 0.000473176475, "volume", ["","",""]], + "": [["ptimp","pint-imp","pints-imp"], 5.6826125e-4, "volume", ["","",""]], "": [["cu","cup","cups"], 0.000236588238, "volume", ["","",""]], "": [["floz","fluid-ounce","fluid-ounces"], 2.95735297e-5, "volume", ["","",""]], + "": [["flozimp", "floz-imp","fluid-ounce-imp","fluid-ounces-imp"], 2.84130625e-5, "volume", ["","",""]], "": [["tb","tbsp","tbs","tablespoon","tablespoons"], 1.47867648e-5, "volume", ["","",""]], "": [["tsp","teaspoon","teaspoons"], 4.92892161e-6, "volume", ["","",""]], "": [["bu","bsh","bushel","bushels"], 0.035239072, "volume", ["","",""]], diff --git a/build/quantities.js b/build/quantities.js index 1310712..b5b39ff 100644 --- a/build/quantities.js +++ b/build/quantities.js @@ -280,8 +280,10 @@ SOFTWARE. "": [["galimp","gallon-imp","gallons-imp"], 0.0045460900, "volume", ["","",""]], "": [["qt","quart","quarts"], 0.00094635295, "volume", ["","",""]], "": [["pt","pint","pints"], 0.000473176475, "volume", ["","",""]], + "": [["ptimp","pint-imp","pints-imp"], 5.6826125e-4, "volume", ["","",""]], "": [["cu","cup","cups"], 0.000236588238, "volume", ["","",""]], "": [["floz","fluid-ounce","fluid-ounces"], 2.95735297e-5, "volume", ["","",""]], + "": [["flozimp", "floz-imp","fluid-ounce-imp","fluid-ounces-imp"], 2.84130625e-5, "volume", ["","",""]], "": [["tb","tbsp","tbs","tablespoon","tablespoons"], 1.47867648e-5, "volume", ["","",""]], "": [["tsp","teaspoon","teaspoons"], 4.92892161e-6, "volume", ["","",""]], "": [["bu","bsh","bushel","bushels"], 0.035239072, "volume", ["","",""]], diff --git a/src/quantities/definitions.js b/src/quantities/definitions.js index 2042c62..8d8d56c 100644 --- a/src/quantities/definitions.js +++ b/src/quantities/definitions.js @@ -87,8 +87,10 @@ export var UNITS = { "": [["galimp","gallon-imp","gallons-imp"], 0.0045460900, "volume", ["","",""]], "": [["qt","quart","quarts"], 0.00094635295, "volume", ["","",""]], "": [["pt","pint","pints"], 0.000473176475, "volume", ["","",""]], + "": [["ptimp","pint-imp","pints-imp"], 5.6826125e-4, "volume", ["","",""]], "": [["cu","cup","cups"], 0.000236588238, "volume", ["","",""]], "": [["floz","fluid-ounce","fluid-ounces"], 2.95735297e-5, "volume", ["","",""]], + "": [["flozimp", "floz-imp","fluid-ounce-imp","fluid-ounces-imp"], 2.84130625e-5, "volume", ["","",""]], "": [["tb","tbsp","tbs","tablespoon","tablespoons"], 1.47867648e-5, "volume", ["","",""]], "": [["tsp","teaspoon","teaspoons"], 4.92892161e-6, "volume", ["","",""]], "": [["bu","bsh","bushel","bushels"], 0.035239072, "volume", ["","",""]],