Update: End Goal:
Show May 10th - June 8th, all dates in between with the Prefix May or June (month name). Which ever date is today.. something like border around that calendar day (style stuff) So outputs all dates in between, each day the 'date' in which is today is highlighted. Outputs like a calendar, with various (unique images) per calendar day (in between described date range). Add specific styles to calendar day that is 'today'. So if it's the 11th, specific styles to May 11th are visible in that calendar region -- if June 2nd the same.
I can do this within one month / same month; with the below, but now it's not so simple, because my date range is in between two months. May 10th - June 8th. How can I split into two arrays - and it's not just a date range; I need to detect if day is today.
<%
For i = 10 to 31
dim time
If i < day_part Then
time = "past"
ElseIf i = day_part Then
time = "today"
Else
time = "future"
End If
suffix = Suffixer(i)
response.write("<section id='day_"& i &"' class='calSquare " & time &"'><article class='dateImage' style='background-image: url(images/Calendar_Thumbnails/Day_"&i&".jpg)'></article></article><article class='dateTitle'> "&i&suffix&"</article></section>")
Next
<!--response.write(products(0))-->
%>
Latest code via answered suggestion below (others have reviewed it may not be valid VBscript but only suggestion I got):
<%
Dim d1 As New Date(2015, 5, 10)
Dim d2 As New Date(2015, 6, 8)
Dim DaysBetween As Long = DateDiff(DateInterval.Day, d1, d2)
Dim d3 As Date
For d As Long = 0 To DaysBetween
d3 = d1.AddDays(d)
If d3 < Today() Then
ElseIf d3 = Today Then
Else
End If
Dim suffix As String = Suffixer(d3.Day)
Next
response.write("<section id='day_"& d &"' class='calSquare " & time &"'><article class='dateImage' style='background-image: url(images/Calendar_Thumbnails/Day_"&d&".jpg)'></article></article><article class='dateTitle'> "&d&suffix&"</article></section>")
<!--response.write(products(0))-->
%>
*I have replaced i with d across the board (with above attempt) -- and didn't work! I have updated my question with the latest code as well. I've gotten feedback that the logic is correct but may not be valid VBscript with constructs being used. Any other suggestions would be amazing!*