You may not need much in the area of scripting.
Define a calculation field set to return a date result:
YourDateField - DayOfWeek(YourDateField) + 1
Base your Sub-summary report on this field (sort by it, create a "subsummary when sorted by" part based on it...)
(I learned this trick from Comment)
That works great. Thanks
I trying for the same result but it does not work what is the date field to get the result