API: Is It A Holiday On Date?
Overview: Find out if a school/region/district/authority is currently on holiday on a specific date.
Result: API returns Holiday Status.
Note that the dates are in the format used in Europe: DD-MM-YYYY also note that the date must be in the future.
Holiday Status: true means the school is on holiday, false means it is a term date
Example API call for a district:
http://myschoolholidays.com/api/isItAHolidayOnADate?district_id=1&date=24-01-2010
Example of returned data:
{"status":true}
Example API call for a school:
http://myschoolholidays.com/api/isItAHolidayOnADate?school_id=8639&date=24-01-2010
Example of returned data:
{"status":true}
Example code for developers to work with
PHP..
< ?php
$ch = curl_init ("http://myschoolholidays.com/api/isItAHolidayOnADate?district_id=1&date=21-01-2010");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
$isItAHoliday = json_decode($output);
echo $isItAHoliday["status"]; // A string containing true or false, note this is not a boolean at this point..
?>