filmtools/secondstominutes
Composer 安装命令:
composer require filmtools/secondstominutes
包简介
Formats seconds to 'mm:ss' or 'hh:mm:ss'
README 文档
README
Formats seconds to 'mm:ss' or 'hh:mm:ss'
Installation
$ composer require filmtools/secondstominutes
Usage
The seconds2minutes function is namespaced, so you will have to mention it in your use statements. The callable class SecondsToMinutes is a wrapper around the function; It can be used as Twig Filter.
use function FilmTools\SecondsToMinutes\seconds2minutes; use FilmTools\SecondsToMinutes\SecondsToMinutes; echo seconds2minutes( 3900 ); // "01:05:00" $formatter = new SecondsToMinutes; echo $formatter( 90 ); // "01:30" $filter = new \Twig\TwigFilter('secondstominutes', new SecondsToMinutes); $twig->addFilter( $filter );
Development and Unit testing
$ git clone https://github.com/filmtools/secondstominutes.git $ cd secondstominutes $ composer install # either, or, and: $ composer phpunit $ vendor/bin/phpunit
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-23