%@ LANGUAGE=VBScript %> <% wYear=Request.QueryString("wYear") IF wYear = "" THEN wYear=Request.Form("wYear") IF wYear = "" OR wYear < 1753 OR wYear > 9999 THEN wYear = DATEPART("yyyy",now()) %>
Sun. | Mon. | Tue. | Wed. | Thu. | Fri. | Sat. | ||||||||||||||||||
<%=MonthName(mc)%> | <% 'Determine day of the week the month begins on tempdate = mc & "/1/" & wYear bwdom = datepart("w", tempdate) DayOfWeekCounter = 0 'This "week" has 8 "days" to include the Name of the Month column. 'PRINT LEADING BLANK DAYS SELECT CASE bwdom CASE 1 DayOfWeekCounter = 1 CASE 2 %><%DayOfWeekCounter = 2 CASE 3 %> | <%DayOfWeekCounter = 3 CASE 4 %> | <%DayOfWeekCounter = 4 CASE 5 %> | <%DayOfWeekCounter = 5 CASE 6 %> | <%DayOfWeekCounter = 6 CASE 7 %> | <%DayOfWeekCounter = 7 CASE ELSE %> | Beginning Day of Week Error | <% END SELECT 'Determine last day of month & number of weeks IF mc < 12 THEN ldom = Day(DateAdd("d", -1, mc + 1 & "/1/" & wYear)) ELSE ldom = Day(DateAdd("d", -1, "1/1/" & wYear + 1)) END IF NumWeeks = 5 IF (bwdom = 6 AND ldom = 31) OR (bwdom = 7 AND ldom > 29) THEN NumWeeks = 6 DayCounter = 1 WeekCounter = 1 DO WHILE WeekCounter < NumWeeks + 1 DO WHILE DayOfWeekCounter < 8 IF DayCounter < ldom + 1 THEN %><%=DayCounter%> | <% 'IF statements for holidays and anniversaries goes here. %> <%ELSE%><%END IF DayOfWeekCounter = DayOfWeekCounter + 1 DayCounter = DayCounter + 1 LOOP DayOfWeekCounter = 1 WeekCounter = WeekCounter + 1 %> | |||||||||||||||
<%LOOP%> <%NEXT%> |
file: /Techref/language/asp/calendar/stdcal.asp.txt, 2KB, , updated: 1999/3/2 20:05, local time: 2024/8/31 17:06,
18.189.171.134:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/Techref/language/asp/calendar/stdcal.asp.txt"> SQL Calendar</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.