Skip to content

Commit 3bd016a

Browse files
authored
Add ImperialQuart to Volume (#1254)
1 parent 7a7c811 commit 3bd016a

File tree

11 files changed

+180
-81
lines changed

11 files changed

+180
-81
lines changed

Common/UnitDefinitions/Volume.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
}
7979
]
8080
},
81-
{
81+
{
8282
"SingularName": "CubicDecimeter",
8383
"PluralName": "CubicDecimeters",
8484
"FromUnitToBaseFunc": "{x} / 1e3",
@@ -461,6 +461,18 @@
461461
}
462462
]
463463
},
464+
{
465+
"SingularName": "ImperialQuart",
466+
"PluralName": "ImperialQuarts",
467+
"FromUnitToBaseFunc": "{x} * 1.1365225e-3",
468+
"FromBaseToUnitFunc": "{x} / 1.1365225e-3",
469+
"Localization": [
470+
{
471+
"Culture": "en-US",
472+
"Abbreviations": [ "qt (imp.)" ]
473+
}
474+
]
475+
},
464476
{
465477
"SingularName": "UsPint",
466478
"PluralName": "UsPints",

Common/UnitEnumValues.g.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,8 @@
15561556
"UsQuart": 50,
15571557
"UsTablespoon": 51,
15581558
"UsTeaspoon": 52,
1559-
"Nanoliter": 53
1559+
"Nanoliter": 53,
1560+
"ImperialQuart": 57
15601561
},
15611562
"VolumeConcentration": {
15621563
"CentilitersPerLiter": 1,

UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeExtensionsTest.g.cs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeExtensions.g.cs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.Tests/CustomCode/VolumeTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ public class VolumeTests : VolumeTestsBase
106106

107107
protected override double DecalitersInOneCubicMeter => 1e2;
108108

109+
/// <summary>
110+
/// https://www.legislation.gov.uk/uksi/1995/1804/made
111+
/// </summary>
112+
protected override double ImperialQuartsInOneCubicMeter => 879.876993196;
113+
109114
[Fact]
110115
public void VolumeDividedByAreaEqualsLength()
111116
{

0 commit comments

Comments
 (0)