Home
<style type="text/css"> .headings { float: left; margin: 0; padding-bottom: 0; padding-right: 5px; } label span, label input, label select{ display: inline-block; vertical-align: middle; } .topLinks { float: right; } </style> <p class="topLinks"> <a href='http://www.ajax.ca'>Town of Ajax</a> | <a href='http://ajax.bibliocommons.com'>Catalogue</a> | <a href='?q=event-created/month'>Calendar</a> | <a href='?q=node/31'>Contact Us</a> | <a href='https://ajax.bibliocommons.com/user/login'>My Account</a> </p> <p>&nbsp;<br>&nbsp;<br></p> <script> // handles the change of the input form to display the appropriate branch information function changeSearch() { var searchTerm = document.getElementById("searchTerm").value; switch(searchTerm) { case "catalogue": document.getElementById('catalogue').style.display = 'block'; document.getElementById('website').style.display = 'none'; break; case "website": document.getElementById('catalogue').style.display = 'none'; document.getElementById('website').style.display = 'block'; break; } } </script> <label> <span>Search the Library's</span> <select id="searchTerm" onChange="changeSearch();"> <option value="catalogue" selected>Catalogue</option> <option value="website">Website</option> </select> <span> <div id="catalogue" style='display: inline;'> <form action="http://ajax.bibliocommons.com/search" id="globalSearch" method="get" onsubmit="javascript: $(this).getElements('input.defaultText').set('value','');"> <input id="search_category" name="search_category" type="hidden" value="title"> <input id="t" name="t" type="hidden" value="keyword"> <input class='searchBox' id="globalQuery" name="q" title="Search Catalogue" type="text" placeholder="Enter search terms ..."> <input name="commit" title="Search the Catalogue" type="submit" value="Search"> </form> </div> <div id="website" style="display: none;"> <?php $block = module_invoke('search', 'block_view', 'search'); print render($block); ?> </div> </span> </label>

You are here

Page Not Found (HTTP 404)

Thank you for visiting the Ajax Public Library's new web page.  Unfortunately the bookmarked page you've tried to access is no longer at this location.  Please use the above menu or call 905-683-4000 for assistance finding the new location of your information.

We thank you for your patience and hope you are as excited about our new website as we are.

Hours and Locations

<style type="text/css"> .branchStatus { font-size: 10pt; font-weight: bold; text-align: center; } .Closed { color: red; } .Open { color: green; } .right { text-align: right; } .today { font-weight: bold; } </style> <script> // handles the change of the input form to display the appropriate branch information function changeValue() { var branch = document.getElementById("location").value; switch(branch) { case "main": document.getElementById('main').style.display = 'block'; document.getElementById('mclean').style.display = 'none'; document.getElementById('village').style.display = 'none'; break; case "mclean": document.getElementById('main').style.display = 'none'; document.getElementById('mclean').style.display = 'block'; document.getElementById('village').style.display = 'none'; break; case "village": document.getElementById('main').style.display = 'none'; document.getElementById('mclean').style.display = 'none'; document.getElementById('village').style.display = 'block'; break; } } </script> <p>Information for <select id="location" onChange="changeValue();"> <option value="main" selected>Main Branch</option> <option value="mclean">McLean Branch</option> <option value="village">Village Branch</option> </select> </p> <?php # ************************************************************************************************************************************************************************ # * hold days of week - for output ease # ************************************************************************************************************************************************************************ $days = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); # ************************************************************************************************************************************************************************ # * hold standard location hours - by PHP date array index # ************************************************************************************************************************************************************************ $main = array('13:00-17:00', '10:00-21:00', '10:00-21:00', '10:00-21:00', '10:00-21:00', '10:00-17:00', '10:00-17:00'); $mclean = array('13:00-17:00', '13:00-21:00', '10:00-21:00', '10:00-21:00', '10:00-21:00', '13:00-21:00', '10:00-17:00'); $village = array('Closed', '15:30-19:30', '15:30-19:30', '15:30-19:30', '15:30-19:30', '11:30-15:30', '11:30-15:30'); # ************************************************************************************************************************************************************************ # * need to keep a list of closed dates - will override the generic open times above - INCLUDES SUNDAYS ... yyyy/mm/dd date format - must be string # ************************************************************************************************************************************************************************ $mainClose = array('2014/10/31', '2014/12/25', '2014/12/26', '2014/12/28', '2015/01/01'); $mcLeanClose = array('2014/10/31', '2014/12/25', '2014/12/26', '2014/12/28', '2015/01/01'); $villageClose = array('2014/10/31', '2014/12/24', '2014/12/25', '2014/12/26', '2014/12/28', '2014/12/31', '2015/01/01'); # ************************************************************************************************************************************************************************ # * need to adjust hours for unique circumstances (extended hours, closed early, etc) ... yyyy/mm/dd date format - must be string # ************************************************************************************************************************************************************************ $mainAdjust = array('2014/12/01' => '10:00-23:00', '2014/12/02' => '10:00-23:00', '2014/12/03' => '10:00-23:00', '2014/12/04' => '10:00-23:00', '2014/12/05' => '10:00-23:00', '2014/12/08' => '10:00-23:00', '2014/12/09' => '10:00-23:00', '2014/12/10' => '10:00-23:00', '2014/12/11' => '10:00-23:00', '2014/12/12' => '10:00-23:00', '2014/12/15' => '10:00-23:00', '2014/12/16' => '10:00-23:00', '2014/12/17' => '10:00-23:00', '2014/12/18' => '10:00-23:00', '2014/12/24' => '10:00-14:00', '2014/12/31' => '10:00-14:00') ; $mcleanAdjust = array('2014/12/24' => '9:00-12:00', '2014/12/31' => '10:00-14:00'); $villageAdjust = array(); # ************************************************************************************************************************************************************************ # * FUNCTION openClosedHours # * - combo function - displays whether we're open or not and shows the upcoming schedule for the week # * - this needs to be one function now to accommodate for the 'special' hours and having the branch status reflected appropriately # ************************************************************************************************************************************************************************ function openClosedHours($branchName, $days, $branch, $closedList, $hourException) { # ************************************************************************************************************************************************************************ # * declare all variables we'll need # ************************************************************************************************************************************************************************ $dayOfWeek = date("w"); #* w is the php day of week from 0 (Sunday) to 6 (Saturday) $time = date("H:i"); #* H is the military time with leading zero, i is the minutes with leading zero # ************************************************************************************************************************************************************************ # * setup variables - to make things smoother # ************************************************************************************************************************************************************************ $counter = 0; #* keeps track of the number of days we've displayed - want to loop for only 7 days (one week) $days[$dayOfWeek] = "Today"; #* neat idea: rather than showing today's day name, show "today" $branchStatus = "Closed"; #* default the status of the branch to closed, work from there # ************************************************************************************************************************************************************************ # * update the information in the array - with closed and adjusted hours if necessary # ************************************************************************************************************************************************************************ do { # ************************************************************************************************************************************************************************ # * reset the days of week if we roll past Saturday in PHP numbers # ************************************************************************************************************************************************************************ if ($dayOfWeek > 6) { $dayOfWeek -= 7; } # ************************************************************************************************************************************************************************ # * need to evaluate some dates on the fly - increment as we go # ************************************************************************************************************************************************************************ $projectedDate = date("Y/m/d", strtotime("+" . $counter ." days")); # ************************************************************************************************************************************************************************ # * check array to determine if we're closed for the day - if so, override the default hours # ************************************************************************************************************************************************************************ if (in_array($projectedDate, $closedList)) { $branch[$dayOfWeek] = "Closed"; } # ************************************************************************************************************************************************************************ # * check to see if this day has special hours - if so, override the default hours # ************************************************************************************************************************************************************************ if(isset($hourException[$projectedDate])) { $branch[$dayOfWeek] = $hourException[$projectedDate]; } # ************************************************************************************************************************************************************************ # * update counters # ************************************************************************************************************************************************************************ $dayOfWeek ++; $counter ++; } while ($counter < 7); # ************************************************************************************************************************************************************************ # * need to reset the day of week because we've manipulated it through the above loop # ************************************************************************************************************************************************************************ $dayOfWeek = date("w"); #* w is the php day of week from 0 (Sunday) to 6 (Saturday) # ************************************************************************************************************************************************************************ # * show the branch status - whether we're open or closed right now. Grab today's hours and override the hours if >= Open or < Closed. # ************************************************************************************************************************************************************************ if (strcmp(strtolower($branch[$dayOfWeek]), "closed") != 0) { list($open, $close) = explode("-", $branch[$dayOfWeek]); if ((strcmp($time, $open) >= 0) && (strcmp($time, $close) < 0)) { $branchStatus = "Open"; } } # ************************************************************************************************************************************************************************ # * output our current status # ************************************************************************************************************************************************************************ echo "<p class='branchStatus " . $branchStatus . "'>$branchName is currently $branchStatus.</p>"; # ************************************************************************************************************************************************************************ # * loop over hours list and spit them out - essentially a duplicate loop, but makes the time readable and outputs it # ************************************************************************************************************************************************************************ $counter = 0; echo "<table>"; do { if ($dayOfWeek > 6) { $dayOfWeek -= 7; } #* same as above # ************************************************************************************************************************************************************************ # * our days information is now correct (either by default or overridden), massage the data so the military time shows up as non-military # ************************************************************************************************************************************************************************ if (strcmp(strtolower($branch[$dayOfWeek]), "closed") != 0) { list($open, $close) = explode("-", $branch[$dayOfWeek]); $branch[$dayOfWeek] = formatTime($open) . "-" . formatTime($close); } # ************************************************************************************************************************************************************************ # * output the results # ************************************************************************************************************************************************************************ $classHold = ''; if ($counter == 0) { $classHold = 'today'; } echo "<tr>"; echo "<td class='" . $classHold . "'>$days[$dayOfWeek]</td>"; echo "<td class='right " . $classHold . "'>$branch[$dayOfWeek]</td>"; echo "</tr>"; # ************************************************************************************************************************************************************************ # * update counters # ************************************************************************************************************************************************************************ $dayOfWeek ++; $counter ++; } while ($counter < 7); echo "</table>"; } # ************************************************************************************************************************************************************************ # * FUNCTION: formatTime # * - helper function that formats the time properly for output # ************************************************************************************************************************************************************************ function formatTime($timeValue) { $timeValue = explode(":", $timeValue); # ************************************************************************************************************************************************************************ # * default time to AM # ************************************************************************************************************************************************************************ $ampm = "AM"; # ************************************************************************************************************************************************************************ # * we're handling values in military time here - subtract accordingly # ************************************************************************************************************************************************************************ if ($timeValue[0] > 12) { $timeValue[0] -= 12; $ampm = "PM"; } # ************************************************************************************************************************************************************************ # * lop off the final two digits if 00 # ************************************************************************************************************************************************************************ if ($timeValue[1] > 0) { $timeValue[1] = ":" . $timeValue[1]; } else { $timeValue[1] = ""; } return $timeValue[0] . $timeValue[1] . $ampm; } ?> <div id="main" style="display: block;"> <?php openClosedHours("Main Branch", $days, $main, $mainClose, $mainAdjust); ?> <p><br><a href="?q=node/1"><img style='float: left; padding-right: 10px;' src='./sites/default/files/media/images/plus.png' title='Additional information'>Additional Main Branch Information</a></p> </div> <div id="mclean" style="display: none;"> <?php openClosedHours("McLean Branch", $days, $mclean, $mcleanClose, $mcleanAdjust); ?> <p><br><a href="?q=node/12"><img style='float: left; padding-right: 10px;' src='./sites/default/files/media/images/plus.png' title='Additional information'>Additional McLean Branch Information</a></p> </div> <div id="village" style="display: none;"> <?php openClosedHours("Village Branch", $days, $village, $villageClose, $villageAdjust); ?> <p><br><a href="?q=node/13"><img style='float: left; padding-right: 5px;' src='.\sites\default\files\media\images\plus.png' title='Additional information'>Additional Village Branch Information</a></p> </div> <p style='text-align: center'><a href="?q=node/216">2014 Branch Holiday Hours</a></p>

Translate

Program & Event Calendar

S M T W T F S
 
 
 
 
 
 
1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
 
 
 
 
 
 

Counting Opinions