steffenbrand / in-time
Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.
Installs: 38 713
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^5.6
This package is auto-updated.
Last update: 2024-10-29 04:53:19 UTC
README
Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.
How to install
composer require steffenbrand/in-time
How to use
$a = 2 * Years::IN_DAYS; // 730 $b = 2 * Weeks::IN_DAYS; // 14 $c = 2 * Days::IN_HOURS; // 48 $d = 2 * Hours::IN_MINUTES; // 120 $e = 3 * Minutes::IN_SECONDS; // 180 $f = 2 * Seconds::IN_MILLISECONDS; // 2000 $g = 2 * Seconds::IN_MICROSECONDS; // 2000000