The System.DateTime object has methods to AddYears(), AddMonths(), AddDays(), AddSeconds(), etc.
I've noticed that there is no AddWeeks(). Why is this?
Also, my requirement is to get a price value from 52 weeks ago. I know this equates to 1 year, but they were specific about 52 weeks.
Would it be the same for me to do:
yearOldPrice = _priceService.GetPriceForDate(price.Date.AddYears(-1));
as
yearOldPrice = _priceService.GetPriceForDate(price.Date.AddDays(-7 * 52));
I ask on the presumption that .AddDays(-7 * 52) is the same as .AddWeeks(-52), 'cause there's 7 days in a week.