Add granulating the time range

Granulating means splitting the time range into exclusive time
ranges of years, months, days and whatever is left.
I think that you can extract this code to a generic method if you use `beginning_of_cycle(period)` and `end_of_cycle` methods.