Setting month and year values for the next 6 months in Javascript
<p>I am using a rather nice iPhone date control for a iPhone only website I am developing: <a href="http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch" rel="nofollow">http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch</a></p>

<p>One of the wheels I want to create is basically the next 6 months with the month and year displayed. To hard code this I used:</p>

<pre><code>var monthsYears = { 
    '05-2010': 'Jun 2010', 
    '06-2010': 'Jul 2010', 
    '07-2010': 'Aug 2010', 
    '08-2010': 'Sep 2010', 
    '09-2010': 'Oct 2010', 
    '10-2010': 'Nov 2010' 
};
</code></pre>

<p>If I take the first one <code>'05-2010': 'Jun 2010'</code></p>

<p><code>05</code> is the month value <code>2010</code> is the year and <code>Jun</code> is the month name </p>

<p>But obviously this is no use as it isn't going to work next month! But I'm stumped how to get this to work dynamically. Any help appreciated.</p>
