inquid / yii2-date-time-handler
Date time handler for yii2
Installs: 542
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- nesbot/carbon: ^2.5
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-10-29 05:10:44 UTC
README
Yii2 Datetime Handler
Date time handler for yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist inquid/yii2-date-time-handler "*"
or add
"inquid/yii2-date-time-handler": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use the methods you need as the following:
\inquid\date_time\DateTimeHandler::formatDate($date,'Y-m-d'); \inquid\date_time\DateTimeHandler::now(); \inquid\date_time\DateTimeHandler::getWeekNumberByDate('2018-09-09');
And thats it!