Daniel Hutmacher has started to create a comprehensive calendar table:
It’s a collection of inline table value functions that generate different types of calendars, with a number of properties that could be relevant for a calendar dimension. Each function has a unique date column, so you can join the functions you need together in a view or a procedure. The functions are:
-
Dates: a plain gregorian calendar.
-
Fiscal, annual: a gregorian, year-based calendar where you can define the start of a year, like a corporate fiscal calendar.
-
Fiscal, 4-4-5 or 52/53: a week-based calendar where years comprise four quarters of 4+4+5 weeks respectively.
-
Indian national calendar
-
Persian calendar
-
Thai calendar
-
Dates of Catholic and Orthodox easter
-
Lunar cycle
I was going to jokingly be shocked that this list didn’t include the Hebrew or Islamic calendars, but then Daniel had to ruin my fun by explaining why not. Check it out and when you’re ready to give it a try, head over to his downloads page.
Comments closed