var tod = new Date();
var ty = y2k(tod.getYear());
var todt = new Date(ty, tod.getMonth(), tod.getDate());
if (todt > new Date(ty, 2, nthd(1, 3, ty))) {
 var a1 = new Date(ty+1, 2, nthd(1, 3, ty+1));
 var a1ty = ty + 1;}
else  {
 var a1 = new Date(ty, 2, nthd(1, 3, ty));
 var a1ty = ty;}
if (todt >= new Date(ty, 9, nthd(1, 10, ty))) {
 var a2 = new Date(ty+1, 9, nthd(1, 10, ty+1));
 var a2ty = ty + 1;}
else  {
 var a2 = new Date(ty, 9, nthd(1, 10, ty));
 var a2ty = ty;}
if (a2 > a1) {
 var a3 = ' to the beginning of the ' + a1ty + ' Expedition season.';
 var diff = a1 - todt;}
else {
 var a3 = ' to the end of the ' + a2ty + ' Expedition season.';
 var diff = a2 - todt;}
diff = diff / 1000;
diff = diff / 60;
diff = diff / 60;
diff = diff / 24;
diff = Math.round(diff);
if (a1 > a2) diff = diff - 1;
var a4 = '. There are ' + diff + ' days';
if (diff == 1) a4 = '. There is ' + diff + ' day';
if ((diff == 0) && (a1 > a2)) {
 a3 = 'This is the last day of the ' + a2ty +  ' Expedition season.';
 a4 = '. ';}
if ((diff == 0) && (a2 > a1)) {
 a3 = 'This is the first day of the ' + a1ty + ' Expedition season.';
 a4 = '. ';}
document.write('Today is ' + mth[todt.getMonth() + 1] + ' ' + todt.getDate() + ', ' + ty + a4 + a3);

