Here is the code for clock - from the webtechs at Burning Man:
<script language="JavaScript">
<!--
/* Functions for countdown - from www.burningman.com*/
function getTodaysDate() {
var today = new Date(); // today's date
//today = new Date("August 27, 2000"); // another date (for testing)
return today;
}
function getBurnDate() {
var burnDate = new Date("Septempber 1, 2003");
return burnDate;
}
function getThisYearStartDate() {
var thisYearStartDate = new Date("August 26, 2002");
return thisYearStartDate;
}
function getNextYearStartDate() {
var nextYearStartDate = new Date("August 25, 2003");
return nextYearStartDate;
}
function getDaysUntil(targetDate) {
var today = getTodaysDate();
var diff = targetDate.getTime() - today.getTime();
diff = Math.floor(diff / (1000 * 60 * 60 * 24));
return diff;
}
function getEventCountdownMessage(daysUntil) {
var message = "only " + daysUntil + (daysUntil == 1 ? " day " : " days ") + " left till Burning Man!";
return message;
}
function getBurnCountdownMessage(daysUntil) {
var message;
if (daysUntil == 0)
message = "The Man burns tonight!";
else
message = "Only " + daysUntil + (daysUntil == 1 ? " day " : " days ") + " left till the Man burns!";
return message;
}
function printEventDates() {
if (getDaysUntil(getBurnDate()) >= 0)
document.write("August 25 - September 1, 2003");
else
document.write("August 25 - September 1, 2003");
}
function printCountdown() {
var countdownMessage;
var daysDiff = getDaysUntil(getThisYearStartDate());
if (daysDiff > 0) {
document.write(getEventCountdownMessage(daysDiff));
}
else {
daysDiff = getDaysUntil(getBurnDate());
if (daysDiff >= 0)
document.write(getBurnCountdownMessage(daysDiff));
else {
daysDiff = getDaysUntil(getNextYearStartDate());
document.write(getEventCountdownMessage(daysDiff));
}
}
}
//-->
</script>
& add this:
<script language="JavaScript">
<!--
document.write('<font face="Arial" color="#ff99ff" size="2">');
printEventDates();
document.write('</font><font face="Arial" color="#cc33ff" size="2">
');
printCountdown();
document.write('</font>');
// -->
</script>