P
Prophet
I have a page which lists of locations of meetings that occur on specific
days of the week (every 1st and 3rd Thursday the meeting is in Langley - as
an example)
The following code works for when it is the day of the week, but I have a
problem when I list tomorrows meeting and today's date is the last day of
the week - it will not recognise the 1st day of the next moth as being
tomorrows date.
I know this is probably very crude, but this is what I have been using - any
ideas???
<script language="JavaScript">
<!--
function tomorrow() {
var mydate=new Date()
var day=mydate.getDay()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var tom=day+1
var daymtom=daym+1
var week1array=new Array("No Meeting","Surrey","Cloverdale","No
Meeting","Langley","No Meeting","No Meeting")
var week2array=new Array("No Meeting","No
Meeting","Whiterock","Abbotsford","Hope","No Meeting","No Meeting")
if ((daymtom)<8)
{document.write("<small><font
face='Arial'><b>"+week1array[tom]+"</b></font></small>")}
else if ((daymtom)<15)
{document.write("<small><font
face='Arial'><b>"+week2array[tom]+"</b></font></small>")}
else if ((daymtom)<22)
{document.write("<small><font
face='Arial'><b>"+week1array[tom]+"</b></font></small>")}
else if ((daymtom)<29)
{document.write("<small><font
face='Arial'><b>"+week2array[tom]+"</b></font></small>")}
else
{document.write("No Meeting")}
}
// -->
</script>
days of the week (every 1st and 3rd Thursday the meeting is in Langley - as
an example)
The following code works for when it is the day of the week, but I have a
problem when I list tomorrows meeting and today's date is the last day of
the week - it will not recognise the 1st day of the next moth as being
tomorrows date.
I know this is probably very crude, but this is what I have been using - any
ideas???
<script language="JavaScript">
<!--
function tomorrow() {
var mydate=new Date()
var day=mydate.getDay()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var tom=day+1
var daymtom=daym+1
var week1array=new Array("No Meeting","Surrey","Cloverdale","No
Meeting","Langley","No Meeting","No Meeting")
var week2array=new Array("No Meeting","No
Meeting","Whiterock","Abbotsford","Hope","No Meeting","No Meeting")
if ((daymtom)<8)
{document.write("<small><font
face='Arial'><b>"+week1array[tom]+"</b></font></small>")}
else if ((daymtom)<15)
{document.write("<small><font
face='Arial'><b>"+week2array[tom]+"</b></font></small>")}
else if ((daymtom)<22)
{document.write("<small><font
face='Arial'><b>"+week1array[tom]+"</b></font></small>")}
else if ((daymtom)<29)
{document.write("<small><font
face='Arial'><b>"+week2array[tom]+"</b></font></small>")}
else
{document.write("No Meeting")}
}
// -->
</script>