Word Clock v2

Post date
Reading time
2 Minute Read
Computing, Play

I’ve seen a few nice-looking representations of clocks around, but when I saw Gumuz’s word clock I thought I could make some improvements to it. Here’s a couple of the changes:

  • Rewrote using MooTools (only because I know it better, I’m currently developing in it, and it gave me a chance to play with Google’s JS API)
  • Rewrote some of the JavaScript logic to be a bit tidier
  • Replaced the letters with dots for an arguably prettier output
  • Reordered the hours in the HTML so that “twelve o’clock” wouldn’t be missing the space (I had to combine two and one for this)
  • Highlighted the a in half for quarter-past and quarter-to, as per one of the comment suggestions

The result is tested in IE (5.5–8), Safari, Chrome and Firefox. I hit a slight issue in IE6− (what a surprise) whereby it interprets a.sec.lit as a.lit (example); I got around it by making sec an ID rather than a class (yes, I know it’s dirty).

Have a look for yourself.

Leave a Reply