<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script>
function update() {
var dat = new Date();
var secondWednesday =getSecondWednesday(dat);
var result="";
if (secondWednesday<dat.getDate()) {
// add a month
dat.setMonth(dat.getMonth()+1);
secondWednesday = getSecondWednesday(dat);
result="its happening on the " + secondWednesday + nice(secondWednesday) + " of next month";
} else if (secondWednesday==dat.getDate()) {
// aghh its today !!
result="AGHhhhh...! its today! the " + secondWednesday + nice(secondWednesday);
} else {
// its later this month
result="its happening on the " + secondWednesday + nice(secondWednesday) + " of this month";
}
document.getElementById("dat").innerHTML = result;
}
// get the second Wednesday for the month in the date supplied
function getSecondWednesday(dat) {
var wednesdays = new Array();
var tryDate;
for (var d=1;d<=31;d++) {
tryDate = new Date(dat);
tryDate.setDate(d);
if (tryDate.getDay()==3) {
wednesdays[wednesdays.length]=d;
d+=6; // add 6 as for will add 1 making one week
}
}
return(wednesdays[1]);
}
// return st nd rd th for month day 'niceness'
function nice(md) {
switch(md) {
case 1:
case 21:
case 31: return("st");
case 2:
case 22: return("nd");
case 3:
case 23: return("rd");
default : return("th");
}
}
</script>
</head>
<body onload="update();">
begin <br />
<div id='dat'>Javascript is disabled, please guess date yourself.</div>
end
</body>
</html>
./configure --prefix=/usr
gcc krum.c -o krum -lusb
email
root
flog archives
In fact I'm not responsible for anything ever, so there!
Disclaimer:
This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk
I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk