tomkirsch/microtime
最新稳定版本:v1.0
Composer 安装命令:
composer create-project tomkirsch/microtime
包简介
CodeIgniter4 Microtime
README 文档
README
Extends CI's Time class to provide microseconds.
Any methods that pass hour, seconds, etc. now have microsecond int as the last arg.
PHP's format for microseconds is .u
MySQL field should be DATETIME(6)
use Tomkirsch\MicroTime\MicroTime;
$time = new MicroTime();
$time->setMicrosecond(6666);
print $time; // 2024-04-22 04:12:22.6666
Casting in Entities
use Tomkirsch\MicroTime\MicroTime;
class Transaction extends Entity{
protected $castHandlers = [
"microtime" => MicroTimeCast::class,
];
protected $casts = [
'trans_date' => 'microtime',
];
}
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-10-17