title: What is the best way to determine the number of days in a month with JavaScript?
body: <p>I've been using this function but I'd like to know what's the most efficient and accurate way to get it.</p>
  
  <pre><code>function daysInMonth(iMonth, iYear) {
     return 32 - new Date(iYear, iMonth, 32).getDate();
  }
  </code></pre>