Last updated:
0 purchases
international system of units
Easily convert unit from and to the international system of units and automatically get the localization for it.
How it work #
Conversions #
This package use extension on num to allow you to convert easily from one unit to another.
For example if you want to transform celsius to fahrenheit here is the code:
0.toKelvin(TemperatureUnit.celsius).toFahrenheit;
copied to clipboard
Localization #
We take care of the localization of the unit for you as an example on length this code will be localized:
isLocalizations.length.locale(12, UnitSystem.international); // 0.012 km
copied to clipboard
This is due to the fact that international system base unit for length is the meters.
What we support currently #
Converstions #
Area
The base unit for area is square meter.
✅ to/from square centimeters
✅ to/from square kilometers
✅ to/from square miles
✅ to/from square yard
✅ to/from square foot
✅ to/from square inches
✅ to/from hectare
✅ to/from acre
Length
The base unit for length is meter.
✅ to/from nanometers
✅ to/from micrometers
✅ to/from millimeters
✅ to/from centimeters
✅ to/from kilometers
✅ to/from inch
✅ to/from foot
✅ to/from yard
✅ to/from miles
✅ to/from nautical miles
Length Per Time (speed)
The base unit for length per time is meters per seconds.
✅ to/from knot
✅ to/from kilometers per hours
✅ to/from miles per hours
Length Per Volume
The base unit for length per volume is meters per liters.
✅ to/from kilometers per liters
✅ to/from miles per us gallons
✅ to/from miles per imperial gallons
Mass
The base unit for mass is kilograms.
✅ to/from tons
✅ to/from milligrams
✅ to/from micrograms
✅ to/from grams
✅ to/from imperial ton
✅ to/from us ton
✅ to/from stone
✅ to/from pound
✅ to/from ounce
Mass Per Length
The base unit for mass per length is kilograms per meters.
✅ to/from grams per meters
✅ to/from grams per miles
✅ to/from kilograms per kilometers
✅ to/from grams per kilometers
Pressure
The base unit for pressure is pascal.
✅ to/from pound force per square inch
✅ to/from bar
Temperature
The base unit for temperature is kelvin.
✅ to/from celsius
✅ to/from fahrenheit
✅ to/from rakine
✅ to/from romer
Time
The base unit for time is seconds.
✅ to/from nanoseconds
✅ to/from microseconds
✅ to/from milliseconds
✅ to/from minutes
✅ to/from hours
✅ to/from days
✅ to/from weeks
✅ to/from months
✅ to/from years
✅ to/from decades
✅ to/from centuries
Volume
The base unit for volume is liters.
✅ to/from us liquid gallons
✅ to/from us liquid quart
✅ to/from us liquid pint
✅ to/from us legal cup
✅ to/from us fluid ounces
✅ to/from us teaspoon
✅ to/from us tablespoon
✅ to/from millimeters
✅ to/from imperial gallon
✅ to/from imperial quart
✅ to/from imperial pint
✅ to/from imperial cup
✅ to/from imperial fluid ounces
✅ to/from imperial teaspoon
✅ to/from imperial tablespoon
✅ to/from cubic meters
✅ to/from cubic foot
✅ t0/from cubic inch
Volume Per Length
The base unit for volume per length is liters per meters.
✅ to/from liters per kilometers
✅ to/from us gallons per miles
✅ to/from imperial gallons per miles
✅ to/from liters per 100 kilometers
Localizations #
Fuel economy
This is a localization helper it use different conversion under the hood for convinience.
The base unit is liters per meters
✅ liters per 100 kilometers
✅ miles per us gallons
✅ miles per imperial gallons
Length Per Time
The base unit is meters per seconds.
✅ kilometers per hours
✅ miles per hours
✅ knot
✅ meters per seconds
Length Per Volume
The base unit is meters per liters.
✅ meters per liters
✅ kilometers per liters
✅ miles per imperial gallons
✅ miles per us gallons
Length
The base unit is meters.
✅ kilometers
✅ meters
✅ miles
✅ inch
Mass Per Length
The base unit is kilograms per meters.
✅ grams per meters
✅ grams per miles
✅ kilograms per kilometers
✅ grams per kilometers
Mass
The base unit is kilograms.
✅ micrograms
✅ milligrams
✅ grams
✅ kilograms
✅ tonnes
✅ imperial tons
✅ us tons
✅ ounces
✅ stone
✅ pounds
Pressure
The base unit is pascals.
✅ pascals
✅ bar
✅ pound force per square inch
Temperature
The base unit is kelvin.
✅ celsius
✅ fahrenheit
✅ kelvin
✅ rankine
✅ romer
Time
The base unit is seconds.
✅ microseconds
✅ milliseconds
✅ seconds
✅ minutes
✅ hours
✅ days
✅ weeks
✅ months
✅ years
✅ decades
✅ centuries
Volume Per Length
The base unit is liters per meters
✅ imperial gallons per miles
✅ us gallons per miles
✅ liters per meters
✅ liters per kilometers
✅ liters per 100 kilometers
Volume
The base unit is liters
✅ cubic foot
✅ cubic feet
✅ cubic inch
✅ us/imperial cup
✅ us/imperial fluid ounce
✅ us/imperial quart
✅ us/imperial pint
✅ us/imperial tablespoon
✅ us/imperial teaspoon
✅ us/imperial liquid gallons
✅ milliliters
✅ liters
Supported language for localizations #
✅ en_US
Features and bugs #
For new conversion please fill new conversion.
If you find a bug.
Suggest new language.
Or something else here.
Contributing #
Please read our contibuting guides.
Support #
If you like or use this package please consider sponsoring me here.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.