lib/edtf/interval.rb
def cover?(other)
      return false unless other.is_a?(Date)

      other = other.day_precision

      case
      when unknown_start?
        max.day_precision! == other
      when unknown_end?
        min.day_precision! == other
      when open_end?
        min.day_precision! <= other
      else
        min.day_precision! <= other && other <= max.day_precision!
      end
    end
# Returns true if other is an element of the Interval, false otherwise.
# In contrast to #include? and #member? this method does not take into
# account the date's precision.
Returns true if other is an element of the Interval, false otherwise.
In contrast to #include. and #member. this method does not take into
account the date's precision.
Returns true if other is an element of the Interval false otherwise . In contrast to #include . and #member . this method does not take into account the date ' s precision .
def cover?(other)
      return false unless other.is_a?(Date)
      other = other.day_precision
      case
      when unknown_start?
        max.day_precision! == other
      when unknown_end?
        min.day_precision! == other
      when open_end?
        min.day_precision! <= other
      else
        min.day_precision! <= other && other <= max.day_precision!
      end
    end
def cover? ( other ) return false unless other . is_a? ( Date ) other = other . day_precision case when unknown_start? max . day_precision! == other when unknown_end? min . day_precision! == other when open_end? min . day_precision! <= other else min . day_precision! <= other && other <= max . day_precision! end end
Returns true if other is an element of the Interval, false otherwise.
Returns true if other is an element of the Interval false otherwise .
other