Check if a given time is inside the current TimeInterval.

 @param [#to_time] other DateTime to check if it's
   inside the current interval.

 @raise [ISO8601::Errors::TypeError] if time param is not a compatible
   Object.

 @return [Boolean]
194878
def include?(other)
      raise(ISO8601::Errors::TypeError, "The parameter must respond_to #to_time") \
        unless other.respond_to?(:to_time)

      (first.to_time <= other.to_time &&
       last.to_time >= other.to_time)
    end
290349
def current_time(self, date):
        
        ret = self.command(
            'global.cgi?action=setCurrentTime&time={0}'.format(date)
        )

        if "ok" in ret.content.decode('utf-8').lower():
            return True

        return False
998316
def +(other)
      moment = @date_time.to_time.localtime(zone) + other.to_f.round(1)

      self.class.new(moment.strftime('%Y-%m-%dT%H:%M:%S.%N%:z'))
    end
1361211
public boolean isExceptionAtThisTime() {
        Time now = new Time();
        for (TimeSpan span : timesOfDay) {
            if (span.isWithin(now)) {
                return true;
            }
        }
        return false;
    }
1094329
def in_time_range?(time)
      time = Time.parse(time) if ! time.is_a?(Time)
      time_range.cover?(time)
    end
341585
def check(self):
    

    if self.value is None:
      return True
    return (time.clock() - self.start) >= self.value
123021
def within(self, other: "Interval", inclusive: bool = True) -> bool:
        
        if not other:
            return False
        if inclusive:
            return self.start >= other.start and self.end <= other.end
        else:
            return self.start > other.start and self.end < other.end
184806
def _before_valid_time_range(self):
        
        if self.start_time is not None:
            try:
                if self.time < self.start_time:
                    return True
            except TypeError:
                return False
        return False
366160
function compareTimes(a, b) {
    if (typeof a !== 'string' || typeof b !== 'string') {
      return NaN;
    }

    var aTimePieces = extractIso8601TimePieces(a);
    var bTimePieces = extractIso8601TimePieces(b);

    if (aTimePieces === null || bTimePieces === null) {
      return NaN;
    }

    for (var timePieceIndex = 0; timePieceIndex < aTimePieces.length; timePieceIndex++) {
      if (aTimePieces[timePieceIndex] < bTimePieces[timePieceIndex]) {
        return -1;
      } else if (aTimePieces[timePieceIndex] > bTimePieces[timePieceIndex]) {
        return 1;
      }
    }

    // If we got here, the two parameters represent the same time of day
    return 0;
  }
545017
public static boolean isCurrentTimeBetweenTowTimes(Date fromDate, Date fromTime, Date toDate, Date timeTo) {
		JKTimeObject currntTime = getCurrntTime();
		JKTimeObject fromTimeObject = new JKTimeObject();
		JKTimeObject toTimeObject = new JKTimeObject();
		if (currntTime.after(fromTimeObject.toTimeObject(fromDate, fromTime)) && currntTime.before(toTimeObject.toTimeObject(toDate, timeTo))) {
			return true;
		}
		return false;
	}
1307598
def set_current_time(self, current_time):
        
        current_time = c_double(current_time)
        try:
            self.library.set_current_time.argtypes = [POINTER(c_double)]
            self.library.set_current_time.restype = None
            self.library.set_current_time(byref(current_time))
        except AttributeError:
            logger.warn("Tried to set current time but method is not implemented in %s", self.engine)
875372
def next_time(time, start_time, closing_time)
      @time = time
      unless @start_time
        @start_time = realign(time, start_time)
        @time = @start_time if @time < @start_time
      end

      return nil unless find_acceptable_time_before(closing_time)

      @uses += 1 if @time
      @time
    end
161251
def valid_time(x: str) -> bool:
    
    if isinstance(x, str) and (
        re.match(TIME_PATTERN1, x) or re.match(TIME_PATTERN2, x)
    ):
        return True
    else:
        return False
1268586
function icaltime_compare(other) {
      var a = this.toUnixTime();
      var b = other.toUnixTime();

      if (a > b) return 1;
      if (b > a) return -1;
      return 0;
    }
179078
def from_time(cls, other):
        
        return cls(other.hour, other.minute, other.second, other.microsecond)
468649
def matches_querytime(instance, querytime):
        
        if not querytime.active:
            return True

        if not querytime.time:
            return instance.version_end_date is None

        return (instance.version_start_date <= querytime.time and
                (instance.version_end_date is None or
                 instance.version_end_date > querytime.time))
89280
def parse_relative_time(time, in_ms = false)
      unless valid_relative_time?(time)
        raise Wavefront::Exception::InvalidRelativeTime
      end

      m = in_ms ? 1000 : 1
      time.delete!('+')
      match = time.match(/^(-?\d*\.?\d*)([smhdwy])$/)
      (match[1].to_f * time_multiplier(match[2]) * m).to_i
    end