title: Get month but needs to reset at the end of the year with javascript
body: <p>I'm hoping you could help me with this. I am trying to create a script that will get month but needs to reset at the end of the year. The purpose is I want to let users know that a service will end in a month. What I have works fine until I get to the end of the year. I'm having a hard time thinking through the solution to calculate the end of the year, causing the script to reset to January. I hope articulated what I'm trying to do. Any help is appreciated. Here's what I have so far</p>
  
  <pre><code>var months = ["January", "February", "March", "April", 
  "May","June","July","August","September","October","November","December"]
  var d = new Date();
  var mon = d.getMonth()+1;
  var oneMonth = months[mon];
  </code></pre>