FSharp.Units
1.0.9-alpha
See the version list below for details.
dotnet add package FSharp.Units --version 1.0.9-alpha
NuGet\Install-Package FSharp.Units -Version 1.0.9-alpha
<PackageReference Include="FSharp.Units" Version="1.0.9-alpha" />
paket add FSharp.Units --version 1.0.9-alpha
#r "nuget: FSharp.Units, 1.0.9-alpha"
// Install FSharp.Units as a Cake Addin #addin nuget:?package=FSharp.Units&version=1.0.9-alpha&prerelease // Install FSharp.Units as a Cake Tool #tool nuget:?package=FSharp.Units&version=1.0.9-alpha&prerelease
FSharp.Units
The main aim for this project was to produce conversion functions for the various units of measurement (listed below). The code and the unit tests are auto-generated by the UnitCodeGenerator tool. Hence any changes need to made within the definitions file.
The code is written in the style of F# if you're after something aimed at C# checkout PutridParrot.Units.
Unit conversions also available for
C#
Java
Python
Rust
Swift
TypeScript
Example
Example of usage:
let fahrenheit = C.toFahrenheit 12.<C>
let celsius = C.create someValue
Each unit of measure then includes functions to convert to each for example, converting each Temperature unit of measure to each other Temperature - it also includes a function to take a value and apply a unit of measure to it.
Angle
* Degrees (deg)
* Gradians (grad)
* Milliradians (mrad)
* Minute Of Arc (arcmin)
* Radians (rad)
* Seconds Of Arc (arcseconds)
Area
* Acres (acre)
* Hectares (hectare)
* Square Feet (feet2)
* Square Inches (inch2)
* Square Kilometres (km2)
* Square Metres (m2)
* Square Miles (mile2)
* Square Yards (yard2)
Data Storage
* Bits (b)
* Gigabits (Gb)
* Gigabytes (GB)
* Kibibits (kibibit)
* Kilobits (k)
* Kilobytes (KB)
* Mebibits (mebibit)
* Megabits (Mb)
* Megabytes (MB)
* Terabits (Tb)
* Terabytes (TB)
Data Transfer Rate
* Bits Per Second (bps)
* GigaBits Per Second (Gbps)
* GigaBytes Per Second (GBps)
* Kibibits Per Second (Kibitps)
* KiloBits Per Second (kbps)
* KiloBytes Per Second (kBps)
* Mebibits Per Second (Mibit)
* MegaBits Per Second (Mbps)
* MegaBytes Per Second (MBps)
* TeraBits Per Second (Tbps)
* TeraBytes Per Second (TBps)
Energy
* Btu (btu)
* Calories (cal)
* Electronvolts (eV)
* Foot Pounds (ftlb)
* Joules (J)
* Kilocalories (kCal)
* Kilojoules (kJ)
* Kilowatt Hours (kWh)
* US Therms (ustherm)
* Watt Hours (Wh)
Frequency
* Gigahertz (GHz)
* Hertz (Hz)
* Kilohertz (kHz)
* Megahertz (MHz)
Fuel Economy
* Kilometre Per Litre (kml)
* Litres per 100 Kilometres (l100km)
* Miles Per Gallon (mpg)
* US Miles Per Gallon (usmpg)
Length
* Centimetres (cm)
* Feet (ft)
* Inches (inch)
* Kilometres (km)
* Metres (m)
* Miles (mile)
* Millimetres (mm)
* Nautical Miles (NM)
* Yards (yard)
Luminous Energy
* LumenHour (lmh)
* LumenMinute (lmmin)
* LumenSecond (lms)
* Talbot (T)
Magnetomotive Force
* Ampere-turns (AT)
* Gilberts (Gi)
Mass
* Carats (ct)
* Grams (g)
* Kilograms (kg)
* Milligrams (mg)
* Ounces (oz)
* Pounds (lb)
* Stones (stone)
* Tonnes (tonne)
Pressure
* Atmospheres (atm)
* Bars (b)
* Pascals (Pa)
* Psi (psi)
* Torrs (Torr)
Speed
* Feet Per Second (fps)
* Kilometres Per Hour (kph)
* Knots (knot)
* Metres Per Second (mps)
* Miles Per Hour (mph)
Temperature
* Celsius (C)
* Fahrenheit (F)
* Kelvin (K)
* Rankine (R)
Time
* Centuries (century)
* Days (day)
* Decades (decade)
* Hours (hour)
* Minutes (minute)
* Months (month)
* Seconds (second)
* Weeks (week)
* Years (year)
Volume
* Fluid Ounces (floz)
* Gallons (gal)
* Kilolitres (kl)
* Litres (l)
* Millilitres (ml)
* Pints (pt)
* Quarts (qt)
* Tablespoons (tbsp)
* Teaspoons (tsp)
* US Cups (uscup)
* US Fluid Ounces (usfloz)
* US Gallons (usgal)
* US Pints (uspt)
* US Quarts (usqt)
* US Tablespoons (ustbsp)
* US Teaspoons (ustsp)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- FSharp.Core (>= 6.0.1)
-
.NETStandard 2.0
- FSharp.Core (>= 6.0.1)
-
.NETStandard 2.1
- FSharp.Core (>= 6.0.1)
-
net6.0
- FSharp.Core (>= 6.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.15 | 1,092 | 2/17/2024 |
1.0.14 | 2,710 | 3/2/2023 |
1.0.13 | 295 | 12/16/2022 |
1.0.12 | 424 | 6/20/2022 |
1.0.11 | 456 | 2/14/2022 |
1.0.11-alpha | 173 | 2/13/2022 |
1.0.10-alpha | 175 | 1/27/2022 |
1.0.9-alpha | 169 | 1/25/2022 |
1.0.8-alpha | 166 | 1/25/2022 |
1.0.7-alpha | 161 | 1/22/2022 |
1.0.6-alpha | 152 | 1/18/2022 |
1.0.5-alpha | 181 | 1/10/2022 |
1.0.4-alpha | 161 | 1/5/2022 |
1.0.3-alpha | 163 | 1/1/2022 |
1.0.1-alpha | 181 | 12/20/2021 |
1.0.0 | 282 | 12/13/2021 |