Date time handler for yii2
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.
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!