Nice!
Shameless plug, I’ve run into a similar problem and created GitHub - wojtekmach/calendar_interval: Functions for working with calendar intervals · GitHub which is a little bit more generic:
iex> CalendarInterval.utc_now(:month)
~I"2019-03"
iex> Enum.to_list(~I"2019-01/03")
[~I"2019-01", ~I"2019-02", ~I"2019-03"]






















