function GetDateRange(ByVal adt_Date)
dim ldt_BeginDate
dim ldt_EndDate
'---if we don't have a valid date to evaluate
' use today's
if not isDate(adt_Date) then adt_Date = Date()
'---check to see if today's date is a saturday
' if not, "walk" back one day at a time until
' we find last Saturday's date
if DatePart("w", adt_Date) = 7 then
ldt_BeginDate = adt_Date
else
do until DatePart("w", adt_Date) = 7
adt_Date = DateAdd("d", adt_Date, -1)
loop
ldt_BeginDate = adt_Date
end if
'---return a string based on the most recent Saturday, and
' and the date 6 days after that.
GetDateRange = cstr(ldt_BeginDate) & " - " & cstr(DateAdd("d", ldt_BeginDate, 6))
end function
response.write GetDateRange(Date())