Please use PHP Google Holidays instead!
$instance = new \Google\Holidays();
$holidays = $instance->withApiKey('<your-google-calendar-api-key>')
->inCountry('<country-abbreviation>')
->list();
Sample Output: See https://developers.google.com/calendar/v3/reference/events/list
Return only name
and date
$holidays = $instance->withApiKey('<your-google-calendar-api-key>')
->inCountry('US')
->withMinimalOutput()
->list();
Sample Output
[
"name": "A holiday",
"date": "2018-01-01"
],
[
"name": "Another holiday",
"date": "2018-02-01"
]
Return only dates
$holidays = $instance->withApiKey('<your-google-calendar-api-key>')
->inCountry('UK')
->withDatesOnly()
->list();
Sample Output
[
"2018-01-01",
"2018-02-01",
"2018-03-15"
]