title: Checking if a date falls between a range of dates
body: <p>I'm trying to learn javascript by writing my own events calendar and I ran into a challenge.</p>
  
  <p>I'm doing this to check if a date falls between the start and end date of an event:</p>
  
  <pre><code>if(thisCellDate &gt; startEventDate &amp;&amp; thisCellDate &lt; endEventDate) {}
  </code></pre>
  
  <p>thisCellDate is the current cell in a grid of days I'm looping over (the days in the current month). The problem is that when the start date is on the same day as the cell's in the grid it doesn't work because the date of the cell is technically earlier.</p>
  
  <p>He is an example of what I'm talking about:</p>
  
  <pre><code>Start Date: Fri May 02 2014 15:01:16 GMT-0400 (Eastern Daylight Time)
  Cell's Date: Sat May 02 2014 00:00:00 GMT-0400 (Eastern Daylight Time)
  End Date: Thu May 29 2014 16:01:24 GMT-0400 (Eastern Daylight Time)
  </code></pre>
  
  <p>I am generation the Cell's date with a date string like: <code>new Date('8,8,2014')</code></p>
  
  <p>Now I was thinking I could solve this issue by just making the cell's date as close as possible to the next date like this: <code>new Date(2013, 8, 8, 23, 59, 59, 999)</code></p>
  
  <p>This way the event dates should always be earlier than the cell dates. Is there a problem doing it this way or is there a clearer way?</p>