PHP code example of shiyin / calendar

1. Go to this page and download the library: Download shiyin/calendar 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/ */

    

shiyin / calendar example snippets


  $a= Calendar::Lunar2Solar(2020, 4, 1, true);
  print_r($a); // [2020, 5, 23]
  

  $s = Calendar::Solar2Lunar(2020, 5, 23);
  print_r($s); // [2020, 4, 1, 1]
  

  $l = Lunar::new(2020, 4, 1, true)
  

  $s = Solar::new(2020, 5, 23);