enomotodev / jp-carbon
Japanese extended version of carbon of the PHP datetime API.
Installs: 52 104
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 4
Open Issues: 0
Requires
- php: ^7.1.8 || ^8.0
- nesbot/carbon: ~2.45
Requires (Dev)
- phpunit/phpunit: ^7.5.20 || ^8.5.14
Suggests
- friendsofphp/php-cs-fixer: Needed for the `composer phpcs` command. Allow to automatically fix code style.
README
Japanese extended version of carbon of the PHP datetime API.
For Carbon < 2.0, please use 1.0 branch
Usage
<?php require 'vendor/autoload.php'; use JpCarbon\JpCarbon; $instance = JpCarbon::createFromDate(2017, 1, 1)->holiday; var_dump($instance); // => string(6) "元日" $instance = JpCarbon::createFromDate(2017, 1, 2)->holiday; var_dump($instance); // => string(12) "振替休日" $instance = JpCarbon::createFromDate(2017, 1, 3)->holiday; var_dump($instance); // => string(0) "" $eto = JpCarbon::createFromDate(2017)->eto; var_dump($eto); // => string(3) "酉"
via Helpers
<?php require 'vendor/autoload.php'; $instance = jp_carbon('20170101')->holiday; var_dump($instance); // => string(6) "元日"
Install
$ composer require enomotodev/jp-carbon
License
MIT License.