Global Constant
Steve Nay's ramblings

Office Hours app: Reporting the next time block

This is the third in a series of three posts about this app. The other pages are here and here.

If you text the CS 462 Office Hours app and get back a response that I’m not currently holding hours, it’d be nice to know when the next time is that I’ll be in. I modified the app using the next() function in Sam’s module to do just that.

This was fairly simple. Here are the important pieces of code. First, the modified SMS rules (rules for voice calls are similar):

This is supported by a function in the global block, similar to Sam’s “verbaldate” function:

What’s next? Perhaps durations: I’m currently holding office hours, but how long will that last (i.e., when does this shift end)? I’d also like to modify the messages to say “today at 3 PM” instead of “Thursday (Feburary 3) at 3 PM”. Lots of good ideas. What do you think?

EDIT: I added durations to the SMS and voice calls, as well as to the class wiki annotation. In addition, we planted site tags there, so everyone sees the schedule now. :)