https://github.com/prinsfrank/measurement-unit
A collection of measurement units for easy conversion and typed code (Weight, Volume, Length, Time, Speed & more!)
https://github.com/prinsfrank/measurement-unit
hacktoberfest php speed time torque volume weight
Last synced: about 1 year ago
JSON representation
A collection of measurement units for easy conversion and typed code (Weight, Volume, Length, Time, Speed & more!)
- Host: GitHub
- URL: https://github.com/prinsfrank/measurement-unit
- Owner: PrinsFrank
- License: mit
- Created: 2022-10-05T17:04:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T15:21:59.000Z (about 1 year ago)
- Last Synced: 2025-03-26T07:21:12.028Z (about 1 year ago)
- Topics: hacktoberfest, php, speed, time, torque, volume, weight
- Language: PHP
- Homepage:
- Size: 342 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Measurement-unit


[](https://codecov.io/gh/PrinsFrank/measurement-unit)
## 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:
```shell
composer require prinsfrank/measurement-unit
```
## Provided units
| Type | Available unit |
|-------------|-------------------------------------------------------------------------------------------------------------------|
| Length | Centimeter, Fathom, Foot, Furlong, HorseLength, Inch, Kilometer, Meter, Millimeter, NauticalMile, StatuteMile, SurveyMile, Thou, Yard |
| Pressure | Bar, Hectopascal, Kilopascal, Millibar, MillimetreOfMercury, Pascal, PoundPerSquareInch, StandardAtmosphere, Torr |
| 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.