Skip to content

Commit a9881f5

Browse files
authored
New unit: Force.ShortTonForce (#821)
* New unit: Force.ShortTonForce * Adjust abbreviations for Force.ShortTonForce, Force.TonneForce, and Mass.ShortTon Attempting to standardize the abbreviation format between tonne/ton for mass and force without introducing breaking changes.
1 parent c4c13e1 commit a9881f5

File tree

14 files changed

+102
-13
lines changed

14 files changed

+102
-13
lines changed

Common/UnitDefinitions/Force.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"Localization": [
5454
{
5555
"Culture": "en-US",
56-
"Abbreviations": [ "Ton" ]
56+
"Abbreviations": [ "tf", "Ton" ]
5757
},
5858
{
5959
"Culture": "ru-RU",
@@ -163,6 +163,20 @@
163163
"Abbreviations": [ "кипф", "койка", "К" ]
164164
}
165165
]
166+
},
167+
{
168+
"SingularName": "ShortTonForce",
169+
"PluralName": "ShortTonsForce",
170+
"FromUnitToBaseFunc": "x*8.896443230521e3",
171+
"FromBaseToUnitFunc": "x/8.896443230521e3",
172+
"XmlDocSummary": "The short ton-force is a unit of force equal to 2,000 pounds-force (907.18474 kgf), that is most commonly used in the United States – known there simply as the ton or US ton.",
173+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Ton-force#Short_ton-force",
174+
"Localization": [
175+
{
176+
"Culture": "en-US",
177+
"Abbreviations": [ "tf (short)", "t (US)f", "short tons-force" ]
178+
}
179+
]
166180
}
167181
]
168182
}

Common/UnitDefinitions/Mass.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"Localization": [
6060
{
6161
"Culture": "en-US",
62-
"Abbreviations": [ "short tn", "ST" ]
62+
"Abbreviations": [ "t (short)", "short tn", "ST" ]
6363
},
6464
{
6565
"Culture": "ru-RU",

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToForceExtensionsTest.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/NumberToForceExtensions.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/ForceTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public class ForceTests : ForceTestsBase
3232

3333
protected override double OunceForceInOneNewton => 3.596943089595368;
3434

35+
protected override double ShortTonsForceInOneNewton => 1.12404471549816e-4;
36+
3537
[Fact]
3638
public void ForceDividedByAreaEqualsPressure()
3739
{

UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs

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

UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs

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

UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/Force.g.cs

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

UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.g.cs

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

UnitsNet.WindowsRuntimeComponent/GeneratedCode/Units/ForceUnit.g.cs

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

0 commit comments

Comments
 (0)