clarkeash / converter
Convert units
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/clarkeash/converter
Requires (Dev)
- phpunit/phpunit: ^6.3
This package is auto-updated.
Last update: 2025-10-07 18:23:04 UTC
README
Convert metrics from one form to another.
Installation
composer require clarkeash/converter
Usage
Convert Memory Sizes
Convert::size()->of(500)->megabytes()->to()->gigabytes(); // 0.5 Convert::size()->of(2)->mebibytes()->to()->bytes(); // 2097152
See the Size class to see all the available conversion methods.
Convert Time
Convert::time()->from(3)->weeks()->to()->days(); // 21 Convert::time()->from(4)->scores()->and(7)->years()->into()->years(); // 87
See the Time class to see all the available conversion methods.