Time Intelligence with custom Calendars like 4-4-5

DAX has a lot of nice functions to make Time Intelligence with Months and Quarters easy. But what if your company uses its own Calendar with custom months and quarters like in the 4-4-5 or 5-4-4 system?