Returns False if the location is closed, or the OpeningHours object
    to show the location is currently open.
556291
def is_open(location=None, attr=None):
    
    obj = utils.is_open(location)
    if obj is False:
        return False
    if attr is not None:
        return getattr(obj, attr)
    return obj
452214
def check(self):
    

    if self.value is None:
      return False
    return (time.clock() - self.start) >= self.value
1254441
public static boolean isValid(@Nullable final String dayOpeningHours) {
        if (dayOpeningHours == null) {
            return true;
        }
        final int p = dayOpeningHours.indexOf(' ');
        if (p < 0) {
            return false;
        }
        final String dayOfTheWeekStr = dayOpeningHours.substring(0, p);
        final String hourRangesStr = dayOpeningHours.substring(p + 1);
        return DayOfTheWeek.isValid(dayOfTheWeekStr) && HourRanges.isValid(hourRangesStr);
    }
311967
public function isClosed(): bool {
        if ($this->isEmpty()) {
            return true;
        }
        $start = $this->getStartPoint();
        $end = $this->getEndPoint();
        return $start === $end;
    }
416615
def is_locked(self):
        
        now = datetime.datetime.utcnow()
        if self.locked_until and self.locked_until >= now:
            return True
        elif self.locked_until and self.locked_until < now:
            self.unlock_account()
            return False
        else:
            return False
368466
def closed(self):
        
        for who, what, old, new in self.history():
            if what == "status" and new == "closed":
                return True
        return False
1114620
def in_hours(self, when):
		

		# convert to local timezone
		when = when.astimezone(self.tz)

		# is it a work day?
		if when.weekday() not in self.hours:
			# not a work day
			return False

		# work out if it is one of the ranges
		for start, end in self.hours[when.weekday()]:
			if start <= when.time() <= end:
				# it's in that range

				# is it a public holiday?  check if it is any range
				for hstart, hend in self.holidays:
					if when >= hstart and when <= hend:
						# it's inside a holiday area.
						return False

				# not in a holiday zone, which means it's business time.
				return True

		# not in any range of hours, and was on a work day
		return False
1244917
def is_closed(self) -> Optional[bool]:
        """"""
        if self._device_type is not None and self._device_type == DeviceType.DoorMagnet:
            return bool(self._current_status & 0x01)
        return None
686585
public boolean isDue() {
        // user opted out. no data collection.
        if(!Jenkins.getInstance().isUsageStatisticsCollected() || DISABLED)     return false;
        
        long now = System.currentTimeMillis();
        if(now - lastAttempt > DAY) {
            lastAttempt = now;
            return true;
        }
        return false;
    }
787608
def conn_is_open(conn):
    """"""
    if conn is None:
        return False

    try:
        get_table_names(conn)
        return True

        # # Idea taken from
        # # http: // stackoverflow.com / questions / 1981392 / how - to - tell - if -python - sqlite - database - connection - or -cursor - is -closed
        # conn.execute("select id from molecule limit 1")
        # return True
    except sqlite3.ProgrammingError as e:
        # print(e)
        return False
889119
def is_closed(self):
        
        return (self.state == SESSION_STATE.CLOSED 
                or self.state == SESSION_STATE.CLOSING)
1333287
function () {
      var i;
      for (i = 0; i < arguments.length; i++) {
         if (!this.is_activity_scheduled(arguments[i])) {
            return false;
         }
      }
      return true;
   }
395526
def is_closing(self) -> bool:
        
        return self.stream.closed() or self.client_terminated or self.server_terminated
463344
protected boolean doesEndingTimeAllowServiceAccess() {
        if (this.endingDateTime != null) {
            val et = DateTimeUtils.zonedDateTimeOf(this.endingDateTime);
            if (et != null) {
                val now = ZonedDateTime.now(ZoneOffset.UTC);
                if (now.isAfter(et)) {
                    LOGGER.warn("Service access not allowed because it ended at [{}]. Now is [{}]", this.endingDateTime, now);
                    return false;
                }
            } else {
                val etLocal = DateTimeUtils.localDateTimeOf(this.endingDateTime);
                if (etLocal != null) {
                    val now = LocalDateTime.now(ZoneOffset.UTC);
                    if (now.isAfter(etLocal)) {
                        LOGGER.warn("Service access not allowed because it ended at [{}]. Now is [{}]", this.endingDateTime, now);
                        return false;
                    }
                }
            }
        }
        return true;
    }
962095
public boolean inMap(Location location)
    {
        for (String map : schedule.getMap())
        {
            if (station.inMap(map, location))
            {
                return true;
            }
        }
        return false;
    }
931744
private boolean isHourInnerCircle(int hourOfDay) {
        // We'll have the 00 hours on the outside circle.
        boolean isMorning = hourOfDay <= 12 && hourOfDay != 0;
        // In the version 2 layout the circles are swapped
        if (mController.getVersion() != TimePickerDialog.Version.VERSION_1) isMorning = !isMorning;
        return mIs24HourMode && isMorning;
    }
837555
public boolean checkRepeatMove ()
    {
        long now = System.currentTimeMillis();
        if (now - _lastRequestTime < STALE_REQUEST_DURATION) {
            return true;

        } else {
            _lastRequestTime = now;
            return false;
        }
    }