True if times can be compared.
506297
def _valid_comparison(time_a, time_b, event_a, event_b):
    """"""
    if time_a == time_b:
        # Ties are only informative if exactly one event happened
        return event_a != event_b
    if event_a and event_b:
        return True
    if event_a and time_a < time_b:
        return True
    if event_b and time_b < time_a:
        return True
    return False
691709
private static boolean constantTimeEquals(byte[] a, byte[] b) {
    if (a.length != b.length) {
      return false;
    }

    int result = 0;
    for (int i = 0; i < a.length; i++) {
      result |= a[i] ^ b[i];
    }
    return result == 0;
  }
902475
def TimeinOpen(self):
    
    now = TWTime().now.hour
    if now >= 9 and now <= 14:
      return True
    else:
      return False
125376
public static boolean isTimeConflict(Time timeFrom, Time timeTo, Time otherTimeFrom, Time otherTimeTo) {
		if (JKDateTimeUtil.isTimesEqaualed(timeFrom, otherTimeFrom) || JKDateTimeUtil.isTimesEqaualed(timeTo, otherTimeTo)) {
			return true;
		}

		// other time start time is between start and end time for this time
		if (timeFrom.after(otherTimeFrom) && timeFrom.before(otherTimeTo)) {
			return true;
		}

		// other time e is between start and end time for this time
		if (timeTo.after(otherTimeFrom) && timeTo.before(otherTimeTo)) {
			return true;
		}

		// if time starting before this time and ends after this time
		if (timeFrom.before(otherTimeFrom) && timeTo.after(otherTimeTo)) {
			return true;
		}

		return false;
	}
210546
public static boolean isTimesEqaualed(Date time1, Date time2) {
		return formatTime(time1).equals(formatTime(time2));
	}
1189708
def time(self, t=None):
        """"""
        if t is None:
            return self._time
        self._time = t
        return self
1114277
private boolean hasLeapMonth(long m0, long m) {
        return (
            (m >= m0)
            && (this.hasNoMajorSolarTerm(m) || this.hasLeapMonth(m0, this.newMoonBefore(m)))
        );
    }
1239916
def _enough_time_has_passed(self, FPS):
    ''''''
    if FPS == 0:
      return False
    else:
      earliest_time = self.last_update_time + (1.0 / FPS)
      return time.time() >= earliest_time
814931
public static boolean lessThan(Time small, Time big) {
        return compare(small, big, CompareWay.LT);
    }
1159196
def is_newer_file(a, b):
    
    if not (op.exists(a) and op.exists(b)):
        return False
    am = os.stat(a).st_mtime
    bm = os.stat(b).st_mtime
    return am > bm
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;
    }
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;
  }
10640
def is_possible_hour(self, hour):
        """"""
        if hour > 23 and self.is_possible_hour(0):
            hour = int(hour)
        if not self._is_overnight:
            return self.st_time.hour <= hour <= self.end_time.hour
        else:
            return self.st_time.hour <= hour <= 23 or \
                0 <= hour <= self.end_time.hour
1117266
def is_same_time(self):
        """"""
        return (
            self.local
            and self.remote
            and FileEntry._eps_compare(self.local.mtime, self.remote.mtime) == 0
        )
410349
def matches?(time)

      time = Time.at(time) unless time.kind_of?(Time)

      time = @timezone.utc_to_local(time.getutc) if @timezone

      return false unless sub_match?(time, :sec, @seconds)
      return false unless sub_match?(time, :min, @minutes)
      return false unless sub_match?(time, :hour, @hours)
      return false unless date_match?(time)
      true
    end
178986
function compareTimeZones(a, b) {
    if (typeof a !== 'string' || typeof b !== 'string') {
      return NaN;
    }

    return normalizeIso8601TimeZone(a) - normalizeIso8601TimeZone(b);
  }
1149917
private static int isTodayOrTomorrow(Resources r, long dayMillis,
                                         long currentMillis, long localGmtOffset) {
        int startDay = Time.getJulianDay(dayMillis, localGmtOffset);
        int currentDay = Time.getJulianDay(currentMillis, localGmtOffset);

        int days = startDay - currentDay;
        if (days == 1) {
            return TOMORROW;
        } else if (days == 0) {
            return TODAY;
        } else {
            return NONE;
        }
    }