rizky92/carbon-helper
最新稳定版本:0.0.4
Composer 安装命令:
composer require rizky92/carbon-helper
包简介
Helper for nesbot/carbon
README 文档
README
A simple global helper methods for nesbot/carbon
Installation
composer require rizky92/carbon-helper
Usage
You may call carbon or carbon_immutable anywhere in your code base like so:
$date = carbon('23-08-2023'); echo $date; // 2023-08-23 00:00:00.0 Asia/Makassar (+08:00)
carbon
Calling carbon method will create a Carbon instance, in which it will change the underlying date value if you chain call methods on it.
$christmas = carbon('December 25, 2022'); $christmas->addDays(6); echo $christmas; // 2022-12-31 00:00:00.0 Asia/Makassar (+08:00)
carbon_immutable
Calling carbon_immutable will create a CarbonImmutable instance that does not change the underlying date value, but will return a new instance with modified value everytime you chain call methods on it.
$christmas = carbon_immutable('December 25, 2022'); $christmas->addDays(6); echo $christmas; // 2022-12-25 00:00:00.0 Asia/Makassar (+08:00)
License
MIT
统计信息
- 总下载量: 155
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-07