Eventually the whole thing could use some OOP, but I don't know how to do that yet. :)
This is a first step. It removes a bunch of redundancy already.

Comments

+++ b/clock.js
@@ -149,12 +122,7 @@ function formatDate(date, dateFormat, timeZone, monthNames, weekdayNames) {
+  var leapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)) ? 1 : 0;

Oops, there are some missing parens here, that actually doesn't work.

StatusFileSize
new12.88 KB

Updated version