# testignore **Repository Path**: singi/testignore ## Basic Information - **Project Name**: testignore - **Description**: 615511 => 7天2时58分31秒 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-01-08 - **Last Updated**: 2022-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # testignore ## 格式化秒数为倒计时格式 > `615511 => 7天2时58分31秒` ### 用法 1 快速用法 ```$php $countdownFormat = new countdownFormat($primary_seconds); $ret = $countdownFormat->format();// 31天23时 ``` 2 所有可用参数 ```$php $countdownFormat = new countdownFormat($primary_seconds,'dhms',countdownFormat::zh_cn); $ret = $countdownFormat->format();// 31天23时44分30秒 ``` ```php /** * Class countdownFormat * @package singi\util * * 使用方法 * $countdownFormat = new countdownFormat($primary_seconds); * $ret = $countdownFormat->format();//e.g. 31天23时 * $format string 'dhms' 格式化格式,如果不是其中之一,则忽略 * $unit int countdownFormat::zh_cn | countdownFormat::zh_tw | countdownFormat::en_us 系统内置时间单位 * array array( 'd' => '自定义-天', 'h' => '自定义-时', 'm' => '自定义-分', 's' => '自定义-秒' ) 自定义时间单位 */ ```