DecodeDateWeek reverse engineers a date AValue, and returns the date broken into its various component parts.
The parameters AYear, AWeekOfYear, and ADayOfWeek are populated with the parts of the date, so that you can then use the variables in your calculations.