%
p_field_date_month = request("p_field_date_month")
Response.CharSet = "EUC-KR" '한글
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
Response.Write ""
tmp_date = p_field_date_month + "-01"
tmp_last_day = DateAdd("d", -1, DateAdd("m", 1, tmp_date))
For i=1 To 6
tmp_max_day = DateAdd("d", 7 - weekday(tmp_date), cDate(tmp_date))
If tmp_max_day > tmp_last_day Then
tmp_max_day = tmp_last_day
End If
Response.Write ""
tmp_date = DateAdd("d", 1, DateAdd("d", 7 - weekday(tmp_date), cDate(tmp_date)))
if tmp_max_day = tmp_last_day then
Exit for
end if
Next
%>