In a language such as DAX, there is an entire page of functions related to (more-or-less) creating date tables of various start/end dates. For example:
D