title: Ruby: How to check if date and time are within a range
body: <p>I'm trying to create a method to determine whether or not a particular date and time (within a certain timezone) are within a range.</p>
  
  <pre><code>range = between(start_time, end_time) 
  
  start_time = "date time timezone"
  end_time = "date time timezone"
  </code></pre>
  
  <p>Here's an example of what the range input will look like:</p>
  
  <pre><code>range =&gt; between("2013-12-25 04:45:00 -0800", "2015-12-25 5:00:01 -0800")
  </code></pre>
  
  <p>I want to return true or false if a particular date and time falls within this range. </p>
  
  <p>Example particular date:</p>
  
  <pre><code>instance = "2014-01-01 16:35:45 -0800"
  
  instance.between("2013-12-25 04:45:00 -0800", "2015-12-25 5:00:01 -0800")
  </code></pre>
  
  <p>I don't have much experience with time in Ruby. Any suggestions would be greatly appreciated.</p>