List months between a given date range I am trying to list the months (January, Febuary etc) between two dates.
I have a start date: 5/4/2015 and an end date: 9/25/2015.

Using range I am able to return the month numbers, but just can't figure out the correct syntax to convert 5 into May.

Here's what I've got so far, maybe there is a better way all together?

TWIG

{% set startMonth = craft.plugin.getStartDate() %} // returns 5/4/2015
{% set endMonth = craft.plugin.getEndData() %} // returns 9/25/2015

{% for month in range(startMonth, endMonth, 1) %}
    {{ month }}  // returns 5 6 7 8 9
{% endfor %}


I've tried doing something like: {{ month|date('F') }} but that returns December for each result. 

I'll eventually need days within this month range, but I am hoping from this I can figure that out.
I made a Craft plugin that simply wraps PHP DatePeriod: "Date Period plugin for Craft". The plugin provides a datePeriod Twig function. It works really simple, your give it a start date, an end date and an interval to create a DatePeriod object.

datePeriod( startDate, endDate, interval )


This DatePeriod object you can now iterate over to get the dates, recurring at the set interval, over the period spanning your start and end date. By default the interval is set to 1 day, but you can modify that with the (optional) parameter. 

{% set datePeriod = datePeriod(startDate, endDate, '1 month') %}

{% for month in datePeriod %}
    {{ month|date('F') }}
{% endfor %}


To also list the days in between, you would add Craft's group filter like so:

{% set datePeriod = datePeriod(startDate, endDate) %}

{% for month, daysInMonth in datePeriod|group('{ object|date("F") }') %}
    {{ month }}
    {% for day in daysInMonth %}
        {{ day|date('d') }}
    {% endfor %}
{% endfor %}