PHP code example of pnpk / japanese-calender

1. Go to this page and download the library: Download pnpk/japanese-calender library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pnpk / japanese-calender example snippets


$ composer 

use pnpk\JapaneseCalender\JapaneseCalender;

$date = new DateTime('2020-08-16');
$japaneseCalender = new JapaneseCalender();
$japaneseCalender->date($date);

^ array:5 [
  "date" => "令和2年8月16日"
  "era" => "令和"
  "year" => "2年"
  "month" => "8月"
  "day" => "16日"
]