Problem
First off, I am going to clarify that this question is not a duplicate of Difference in months between two dates in javascript or javascript month difference
My question is specifically about getting the months in between two dates, not the number of months.
Expected Results
So If date1
is 11/01/2022 (mm/dd/yyyy) and date2
is 02/20/2023, it should output an array of months including the month of date1
and date2
like ["November", "December", "January", "February"]
. I need to know how to return the actual months between two dates, not the number of months. Can somebody explain what would be the way to do that?