Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.94 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.94 KB
Banner

Measurement-unit

GitHub PHP Version Support codecov

Setup

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

Provided units

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.