Code:
<head>
<title>date in words</title>
<script language="Javascript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
var this_date_words_array = new Array ("","first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth","eleventh","twelfth","thirteenth","fourteenth","fifteenth","sixteenth","seventeenth","eighteenth","nineteenth","twentieth","twenty-first","twenty-second","twenty-third","twenty-fourth","twenty-fifth","twenty-sixth","twenty-seventh","twenty-eighth","twenty-ninth","thirtieth","thirty-first")//date as words
var this_month_name_array = new Array("january","february","march","april","may","june","july","august","september","october","november","december") //month names
var this_date_timestamp=new Date() //get current day-time stamp
var this_date_words = this_date_timestamp.getDate() //extract day of month
var this_month = this_date_timestamp.getMonth() //extract month
var this_year = this_date_timestamp.getYear() //extract year
if (this_year < 1000)
this_year+= 1900; //fix Y2K problem
var this_date_string = '<span class="emphasis">' + this_date_words_array[this_date_words] + '</span>' + '<span class="basic">' + ' of ' + '</span>' + '<span class="emphasis">' + this_month_name_array[this_month] + '</span>' //concat long date string</p>
</script>
<style type="text/css">
span.basic
{
font-family:ariel;
color:#702342;
font-weight:normal;
font-size: 20px;
}
span.emphasis
{
font-family:ariel;
color:#702342;
font-size: 40px;
}
</style>
</head>
<body onload="JavaScript:timedRefresh(3600000);">
<div align="left">
<script language="JavaScript">document.write(this_date_string)</script>
</div>
</body>
Regards
Bookmarks