title: Moment.js: Date between dates
body: <p>I'm trying to detect with Moment.js if a given date is between two dates. Since version 2.0.0, Tim added <code>isBefore()</code> and <code>isAfter()</code> for date comparison.</p>
  
  <p>Since there's no <code>isBetween()</code> method, I thought this would work:</p>
  
  <p><pre><code>var date = moment("15/02/2013", "DD/MM/YYYY");
  var startDate = moment("12/01/2013", "DD/MM/YYYY");
  var endDate = moment("15/01/2013", "DD/MM/YYYY");</p>
  
  <p>if (date.isBefore(endDate) 
   &amp;&amp; date.isAfter(startDate) 
   || (date.isSame(startDate) || date.isSame(endDate))
  ) { 
    alert("Yay!"); 
  } else {
    alert("Nay! :("); 
  }
  </pre></code></p>
  
  <p>I'm convinced there's got to be a better way to do this. Any ideas?</p>