summary

http://api.lib.sfu.ca/hours/summary
Get summary hours for the main library buildings.
date
Optional date string (YYYY-MM-DD) to retrieve hours information for. Defaults to today.
[
    {
        name: "Bennett Library",
        close_time: "11:45PM",
        open_time: " 8:00AM",
        closed_all_day: "",
        open_all_day: "",
    },
    ...
]

Example usage - to display something similar to the main Library website hours summary, the logic is:


if ( hours->closed_all_day ) {
    print 'CLOSED';
}
elsif ( hours->open_all_day ) {
    print 'OPEN 24 hours';
}
elsif ( hours->in_range ) {
    print 'OPEN until ' . hours->close_time;
}
else {
    print 'OPEN' . hours->open_time . ' to ' . hours->close_time;
}