chatgpt just helped me write a typescript function using the datefns library to get a list of starting and ending dates of each month from 2022-12 until the current month. The result was exactly what they needed