Note Make sure you are running PHP 8.1 or higher to use this package
To use this package in your project, run the following command:
composer require prinsfrank/measurement-unit
Type | Available unit |
---|---|
Length | Fathom, Foot, Furlong, HorseLength, Inch, Meter, Kilometer, NauticalMile, StatuteMile, SurveyMile, Thou, Yard |
Speed | KilometerPerHour, Knot, MeterPerSecond, MilesPerHour |
Temperature | Celsius, Fahrenheit, Kelvin, Rankine |
Time | Day, Hour, Minute, Second |
Torque | NewtonMeter |
Volume | CubicInch, CubicMeter, CubicYard, FluidDram, FluidOunce, Liter, Pint, Quart, TableSpoon |
Weight | Kilogram, MetricTon, Pound |
All the units of a type can be converted to each other with corresponding methods.