That's great with one (small?) problem. If the current date doesn't match Sunday, then the days previous to the current date show the dates for the following week, not the current week.
Eg: Monday Aug. 8, 2008 is today's date, and with your code Sunday's date shows as Aug. 14th not Aug. 7th (which I would prefer)