manchenkov/timer
Composer 安装命令:
composer require manchenkov/timer
包简介
'Timer' is a class to help build time interval value in seconds by object-oriented style
README 文档
README
Timer is a class to help build time interval value in seconds by object-oriented style
Installation
You have to run following command to add a dependency to your project
composer require manchenkov/timer
or you can add this line to require section of composer.json
"manchenkov/timer": "*"
Usage
use Manchenkov\Timer\Timer; $timer = Timer::get()->hours(5)->minutes(10)->seconds(34); $intervalValue = $timer->asNumber(); // <int> -> 18634 = 34 + (10 * 60) + (5 * 3600) $intervalString = $timer->asString(); // <string> -> 05:10:34 // or $intervalString = (string)$timer; // <string> -> 05:10:34
Testing
To run test cases you should execute the following command
./vendor/bin/phpunit tests --testdox
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-22