Get unique array of month and years between two dates

Viewed 714

I have two Date objects, for example:

first = Fri, 02 Dec 2016 
last = Wed, 01 Mar 2017

What is the most efficient way to get a unique array of months and years between them? In this case I'm after:

Dec 2016
Jan 2017
Feb 2017
Mar 2017
6 Answers
Related