Hi All
I am struggling with something and thought someone here must be able to point me in the right direction
I have an external js file that has a date function set up like the following:
//JavaScript Document
dayName = new Array ("Sunday","Monday","Tuesday"
,"Wednesday","Thursday","Friday","Saturday")
monName = new Array ("January","February","March"
,"April","May","June","July","August","Septembe r"
,"October","November","December")
now = new Date
if (now.getDate() == 1 || now.getDate() == 21 || now.getDate() == 31)
{x="st"}
else
if (now.getDate() == 2 || now.getDate() == 22)
{x="nd"}
else
if (now.getDate() == 3 || now.getDate() == 23)
{x="rd"}
else
{x="th"}
From that the code in my document is:
<div class="daydisplay">
<script language="JavaScript" type="text/javascript">
document.write(dayName[now.getDay()] + ", " + monName[now.getMonth()] +
" " + now.getDate() + x + " " + now.getFullYear())
</script>
</div>
So far so good, does exactly what I want. However, I also want to use the results from the date function to do one other thing. The site I am building is for a F1 fan site, and I want it to say what the next round is based upon what the date is now, eg, if the date is 13th August and the next race is on the 20th Aug it will say where the next race is automatically, and then change itself when the date applies to the next race. Do I make any sense?

So I dont have to keep changing things manually. I thought I nearly had it earlier but alas, back to the drawing board.
Any help much appreciated. Thanks BHD