Automatically write the day and date of your next monthly meeting into a page:
Code:
<h3 align="Center">
Our Next Meeting:<br>
<script LANGUAGE="JavaScript">
<!-- begin script
/*
Regular Meetings Script- Use this script to automatically write the day and date
of your next monthly meeting. It also allows you to over ride the automated function
when meetings are held on alternative days & dates.
Enjoy! -Chad Chadwick (ccemmett@there.net)
*/

// enter meeting day of the week here (day name MUST be capitalized)
var targetDay="Monday"

// enter meeting week of the month here- weeks numbered 1,2,3 and 4
var targetWeek=3

// alternative date or other message here between the double quotes 
// remember to change it back to blank ("") when the alternative date has passed
var altDate=""

// do not edit below this line
var currentdate=new Date()
var year=currentdate.getYear()
if (year < 1000)
year+=1900
var day=currentdate.getDay()
var month=currentdate.getMonth()
var daym=currentdate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var datetext=""
var testdate=currentdate
testdate.setDate(1)
var tday=testdate.getDay()+1
var mday=0
var mdate=0
nextdate()
if (daym>mdate) {
if (month==11) {
month=0
year=year+1
testdate.setYear(year)
testdate.setMonth(month)
testdate.setDate(1)
tday=testdate.getDay()+1
nextdate()}
else {
month=month+1
testdate.setMonth(month)
testdate.setDate(1)
tday=testdate.getDay()+1
nextdate()}
}
if (altDate=="") {
datetext=targetDay+", "+montharray[month]+" "+mdate+"th, "+year}
else {datetext=altDate}
document.write(datetext)
// meeting date finder function

function nextdate() {
for (var i = 0; i < 7; i++) {
if (dayarray[i]==targetDay) {
mday=i+1
break
}
}
if (mday>=tday) {
mdate=mday-tday+1}
else {mdate=7-tday+mday+1}
if (targetWeek==2) {
mdate=mdate+7
}
if (targetWeek==3) {
mdate=mdate+14
}
if (targetWeek==4) {
mdate=mdate+21
}
}
// end script -->
</script>
</h3>
I ain't no javascript genius but do hope this script is useful. Thanks to all of you who have helped me learn what little I have about coding.

-CC