title: What is the correct way to work with infinite dates (events that lasts forever) in Ruby?
body: <p>In my project I work with events, along with some data associated with them, each event has its <code>start_date</code> and <code>end_date</code>. Some events however last indefinitely and have <code>end_date</code> of <code>nil</code>, later user is able to set <code>end_date</code> to some real value, but meanwhile they should be treated like they never end.</p>
  
  <p>I've found that it's very handy to work with periods like that using <code>Range</code>, so model looks like this:</p>
  
  <pre><code>class Event &lt; ...
    # ...
  
    def period
      start_date .. (end_date || Date::Infinity.new)
    end
  end
  </code></pre>
  
  <p>This code works well in most cases like:</p>
  
  <pre><code>period.include?(Time.zone.today)
  # or
  Time.zone.today &gt; period.max
  </code></pre>
  
  <p>But <code>Date::Infinity</code> itself was made for internal use only. So I was wondering what are the best practices of working with infinite periods and is there are any libraries which can help with that?</p>