https://github.com/inquid/yii2-date-time
Yii2 Date Time handler
https://github.com/inquid/yii2-date-time
Last synced: 5 months ago
JSON representation
Yii2 Date Time handler
- Host: GitHub
- URL: https://github.com/inquid/yii2-date-time
- Owner: inquid
- Created: 2018-03-19T02:51:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T22:01:26.000Z (almost 7 years ago)
- Last Synced: 2024-12-29T14:37:13.131Z (about 1 year ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=contact@inquid.co&item_name=Yii2+extensions+support&item_number=22+Campaign&amount=5%2e00¤cy_code=USD)
Yii2 Datetime Handler
=====================
Date time handler for yii2
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
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:
```php
\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!
SUPPORT
-----
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=contact@inquid.co&item_name=Yii2+extensions+support&item_number=22+Campaign&amount=5%2e00¤cy_code=USD)