We have a calendar table on our database which holds data with respect to actual date, week number, day name, month name, year etc etc then we can link this to any other date on any other database table (using the actual date column in calendar) and use it as the basis for any date dimensions or calculations. The calendar table itself contains years of data from past and for future.