I found this in our old ASP codebase:
if (datepart("y", date)) < 0 then dateselect = "<OPTION value='/prog/schedule/week.asp?date=" & CDATE(date) & "'>This Week</OPTION><OPTION value='/prog/schedule/week.asp?date=" & CDATE(date) + 7 - offset & "'>" & CDATE(date) + 7 - offset & "</OPTION><OPTION value='/prog/schedule/week.asp?date=" & CDATE(caldate) + 14 - offset & "'>" & CDATE(date) + 14 - offset & "</OPTION>"
else dateselect = "<OPTION value='" & CDATE(date) - 7 - offset & "'>" & CDATE(date) - 7 - offset & "</OPTION><OPTION value="/prog/schedule/week.asp">This Week</OPTION><OPTION value='/prog/schedule/week.asp?date=" & CDATE(date) + 7 - offset & "'>" & CDATE(date) + 7 - offset & "</OPTION><OPTION value='/prog/schedule/week.asp?date=" & CDATE(date) + 14 - offset & "'>" & CDATE(date) + 14 - offset & "</OPTION>" end if
We were trying to get our graphic designer to learn some code and maintain the codebase. The question is "When is the year component of the date ever going to be < 0"?
N