1. Go to this page and download the library: Download zhuxiaojin/holiday-china 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/ */
function holidayData($date);
int $date 你要查询的日期,不传默认为今天 格式2018-10-03
function holidayDataList($dates);
array $dates 批量查询的日期集合,必填参数,格式['2019-01-13','2018-04-12']
public function edit(HolidayChina $holiday){
$response=$holiday->holidayData('2018-10-09');
}
public function edit(){
$response=app('holiday')->holidayDataList(['2018-09-10']);
}