Returns true if current time is in allowed range.
339790
public function isInTime(DateTimeInterface $now) : bool
	{
		if ($times = $this->values[static::TIME]) {
			foreach ($times as $time) {
				if ($time['to'] && $time['to'] >= $now->format('H:i') && $time['from'] <= $now->format('H:i')) {
					// Is in range with precision to minutes
					return TRUE;
				} elseif ($time['from'] == $now->format('H:i')) {
					// Is in specific minute
					return TRUE;
				}
			}

			return FALSE;
		}

		return TRUE;
	}
1262416
private boolean inRange() {
        if (m_working == null || m_nextOut == null) {
            return false;
        }

        Timestamp rangeUpper = m_nextOut.getTimestamp();
        Timestamp rangeLower = m_nextOut.getTimestamp().minus(m_resolution);

        return m_working.getTimestamp().lte(rangeUpper) && m_working.getTimestamp().gt(rangeLower);
    }
385289
def check_time(value):
    """"""
    try:
        h, m = value.split(':')
        h = int(h)
        m = int(m)
        if h >= 24 or h < 0:
            raise ValueError
        if m >= 60 or m < 0:
            raise ValueError
    except ValueError:
        raise TimeDefinitionError("Invalid definition of time %r" % value)
946149
@SuppressWarnings("deprecation")
	public static boolean isTimeInRange(java.sql.Time start, java.sql.Time end, java.util.Date d) {
        d = new java.sql.Time(d.getHours(), d.getMinutes(), d.getSeconds());

        if (start == null || end == null) {
            return false;
        }

        if (start.before(end) && (!(d.after(start) && d.before(end)))) {
            return false;
        }

        if (end.before(start) && (!(d.after(end) || d.before(start)))) {
            return false;
        }
        return true;
    }
447053
public boolean isActive() {
		final long now = System.currentTimeMillis();
		final long start = values.getStart();
		final long end = start + values.getLeft();
		// TODO : Ensure predicate consistency.
		return now >= start && now <= end;
	}
1362919
public function isTimeNearlyUp(float $threshold = self::TIME_UP_THRESHOLD): bool
    {
        $max_execution_time = (int) ini_get('max_execution_time');

        // If there's no time limit, then we can't run out of time.
        if ($max_execution_time === 0) {
            return false;
        }

        $now = microtime(true);

        return $now + $threshold > $this->start_time + (float) $max_execution_time;
    }
302103
public function isTimeLimitUp(float $limit = self::TIME_LIMIT): bool
    {
        $now = microtime(true);

        return $now > $this->start_time + $limit;
    }
50026
def is_time_day_valid(self, timestamp):
        
        (start_time, end_time) = self.get_start_and_end_time(timestamp)
        return start_time <= timestamp <= end_time
758791
def current_ts?(time)
      (current_version.time <= time) &&
        (next_version.nil? || (next_version.time < time))
    end
1039892
protected synchronized boolean isAvailable(long now) {
		if (max == 0 || min == 0) {
			return true;
		}
		if (now - max > lockTimeout) {
			if (now - tested > lockTimeout) {
				tested = now;
				return true;
			}
			return false;
		}
		if (locked) {
			return false;
		}
		if (now - min > windowLength) {
			return true;
		}
		locked = true;
		return false;
	}
384153
def today(self, chamber):
        ""
        now = datetime.date.today()
        return self.by_range(chamber, now, now)
513940
public boolean isUsable() {
        return isConnected() && TimeUnit.MILLISECONDS.toMinutes(new Date().getTime() - lastUsage.getTime()) <= MAXIMUM_AGE_IN_MINUTES;
    }
66517
private function checkTime()
    {
        if (is_null($this->timeLimit)) {
            return false;
        }

        if (($this->startTime + $this->timeLimit) <= time()) {
            return true;
        }
        return false;
    }
551307
def now(self):
        ''' 
        '''
        utcnow = datetime.utcnow()
        return utcnow + timedelta(hours=self.time_zone)
58841
def validate_hour_lock(time, start_time)
      h0 = starting_unit(start_time)
      h1 = time.hour
      if h0 >= h1
        h0 - h1
      else
        if dst_offset = TimeUtil.dst_change(time)
          h0 - h1 + dst_offset
        else
          24 - h1 + h0
        end
      end
    end
1252883
protected function isTimestampValid($time, $now = null)
    {
        if (empty($now)) {
            $now = $this->getCurrentTimestamp();
        }

        return $time <= $now
            && $time > $now - 20 * 365 * 86400;
    }
746235
def hascurrent(self, allowempty=False):
        """"""
        for e in self.select(Current,None,False, False):
            if not allowempty and len(e) == 0: continue
            return True
        return False