As many of you might remember, we’ve been having a load of trouble with the hours module since we moved over to the new version of the webteam’s CMS this fall. At the heart of the problems is the difference between what people mean when they say “today,” and what computers mean by “today.” Since the Mary Idema Pew Library is open until 2am most nights, we consider 2am to be part of the previous day’s operating hours. For us, that’s not hard to grasp. If we say that Monday’s hours are from 7:30am until 2am, we know that if it’s 1:30am on Tuesday, Monday’s hours still apply.
Computers though? Not so much.
It’s really hard to convince a computer that Tuesday morning is really still part of Monday, unless you’ve built a data structure that explicitly supports this. Since we’re using a version of the hours system that the web team built for Campus Dining (who is not open after midnight, to my knowledge), this use case wasn’t built into the way that the schedules are stored in the database. While the web team made the module work for us (so that we could be open until 2am) there have been a few glitches in the system when it was calculating just when “today” is, because the underlying data structure wasn’t meant to play games with the meaning of “today.”
While the web team was working on a bug that popped up over the weekend (which claimed that Frey was open on Sunday, when it was not), they spotted another problem that has affected the module on and off for a few weeks. Namely, it’s all well and good that we can say we’re open until 2am, but at 1:30am, what is the meaning of “today”? After all, the hours module on the homepage said “Today’s Hours.” If the computer believes that today is Tuesday, then it won’t think we are open at 1:30am, since Tuesdays hours are from 7:30am until 2am Wednesday. However, if we tell the computer that 1:30am is actually still Monday, then the hours shown for the other libraries that are closed will actually be Monday’s hours. At 1:30am the day after Memorial Day, for instance, “Today’s hours” will say that all of our libraries are closed, which a user will interpret to be Tuesday’s hours. And more to the point, every week at 1:30am on Friday morning all of the libraries will show that “today” they are open the same hours as Thursday, when they’re not.
There wasn’t any easy solution for these cases, but here is what we decided to do. We’ve changed the label of the homepage module to read the weekday of the hours it is pulling, instead of “Today.” We’re also telling the server that the new day doesn’t switch over until 2am, to accommodate Mary Idema Pew’s hours. That way, if you happen to look at the hours on Friday morning at 1:30 am, it will tell you that it is showing “Thursday’s hours.” Here’s what it looks like today:
This shouldn’t affect the hours around Exam Cram (which has been the most confusing time of the year), and should help users better understand which hours are being shown on the site during those strange overlapping times, like the 2 hours after midnight.
As always, if you see the hours page behaving badly, please let me know. If you snap a screenshot as well, feel free to send that along to my email but only if you’ve reported the problem through the status page. Thanks!