https://github.com/steffenbrand/in-time
Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.
https://github.com/steffenbrand/in-time
days milliseconds minutes months seconds time time-conversion weeks years
Last synced: 6 months ago
JSON representation
Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.
- Host: GitHub
- URL: https://github.com/steffenbrand/in-time
- Owner: steffenbrand
- License: unlicense
- Created: 2017-06-28T09:52:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T09:02:20.000Z (over 7 years ago)
- Last Synced: 2025-01-13T09:42:24.156Z (9 months ago)
- Topics: days, milliseconds, minutes, months, seconds, time, time-conversion, weeks, years
- Language: PHP
- Homepage: https://github.com/steffenbrand/in-time
- Size: 10.7 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# InTime
[](https://travis-ci.org/steffenbrand/in-time)
[](https://scrutinizer-ci.com/g/steffenbrand/in-time/?branch=master)
[](https://packagist.org/packages/steffenbrand/in-time)
[](//packagist.org/packages/steffenbrand/in-time)
[](https://packagist.org/packages/steffenbrand/in-time)
[](https://github.com/steffenbrand/in-time/blob/master/LICENSE.md)
[](https://github.com/steffenbrand/in-time/blob/master/composer.lock)Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.
* [InTime on Packagist](https://packagist.org/packages/steffenbrand/in-time)
* [InTime on GitHub](https://github.com/steffenbrand/in-time)## How to install
```
composer require steffenbrand/in-time
```## How to use
```php
$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
```