<% dim current_date, first_day, this_date dim counter,days, weeks, current_year dim month_name(12) month_name(1)="January " month_name(2)="February " month_name(3)="March " month_name(4)="April " month_name(5)="May " month_name(6)="June " month_name(7)="July " month_name(8)="August " month_name(9)="September " month_name(10)="October " month_name(11)="November " month_name(12)="December " current_date=date() current_year=year(current_date) this_date=day(current_date) month_number=month(current_date) first_day=weekday(dateSerial(current_year,month_number,01)) select case month_number case "1","3","5","7","8","10","12" last_day=31 case "2" last_day=28 right_year_divided=current_year/4 if right_year_divided = cint(right_year_divided) then last_day=29 end if if right(current_year,2)="00" then right_year_divided=current_year/400 if right_year_divided = cint(right_year_divided) then last_day=29 end if ' end check of year values end if ' end check for new century case else last_day=30 end select ' end selct of month %> <% for counter = 1 to 7 %> <% next %> <% for weeks = 1 to 5 %> <% for counter = 1 to 7 days=days+1 if days <= last_day then %> <% end if ' End check for end of month next %> <% next %>
<%= month_name(month_number) & current_year %>
SMTW ThFSa
<% if counter > first_day-1 then days=days+1 if days=this_date then response.write "" & days & "" else response.write days end if ' End check for current date end if ' End check for first day of the week %>
<% if days=this_date then response.write "" & days & "" else response.write days end if ' End check for current date %>