Comparing yesterday volume is high, low or equal.
        return ↑,↓ or -
        與前一天 days 日成交量移動平均比較
        rev = 0
          回傳 ↑,↓ or -
        rev = 1
          回傳 1,-1 or 0
421268
def MACVOL(self,days,rev=0):
    
    yesterday = self.stock_vol[:]
    yesterday.pop()
    yes_MAVOL = float(sum(yesterday[-days:]) / days)
    today_MAVOL = self.MAVOL(days)

    return self.high_or_low(today_MAVOL, yes_MAVOL,rev)
262909
def -(other)
      if other.instance_of?(TimeOfDay)
        TimeOfDay.from_second_of_day @second_of_day - other.second_of_day
      else
        TimeOfDay.from_second_of_day @second_of_day - other
      end
    end
1309725
function isDayBetween(d, d1, d2) {
  var date = clone(d);
  date.setHours(0, 0, 0, 0);
  return isDayAfter(date, d1) && isDayBefore(date, d2) || isDayAfter(date, d2) && isDayBefore(date, d1);
}
1202387
function () {
        var unixTime = jsdate.getTime() / 1000;
        var secondsPassedToday = unixTime % 86400 + 3600; // since it's based off of UTC+1
        if (secondsPassedToday < 0) { secondsPassedToday += 86400; }
        var beats = ((secondsPassedToday) / 86.4) % 1000;
        if (unixTime < 0) {
          return Math.ceil(beats);
        }
        return Math.floor(beats);
      }
909684
def previous_workday(dt):
    
    dt -= timedelta(days=1)
    while dt.weekday() > 4:
        # Mon-Fri are 0-4
        dt -= timedelta(days=1)
    return dt
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;
        }
    }
89032
def time_f day
      start = start_time_f day
      finish = finish_time_f day
      if start == finish && start == ""
        # whole day
        ""
      elsif start == finish && start == "..."
        "..."
      else
        "#{start_time_f day} - #{finish_time_f day}"
      end
    end
7921
def daily_returns(self):
        
        if self._static_unit_net_value == 0:
            return np.nan
        return 0 if self._static_unit_net_value == 0 else self.unit_net_value / self._static_unit_net_value - 1
390438
public int getDayDifference(long first, long second) {

        Calendar firstDay = getStartOfDay(first);
        Calendar secondDay = getStartOfDay(second);
        int result = 0;
        if (first >= second) {
            while (firstDay.after(secondDay)) {
                firstDay.add(Calendar.DAY_OF_MONTH, -1);
                result += 1;
            }
        } else {
            while (secondDay.after(firstDay)) {
                secondDay.add(Calendar.DAY_OF_MONTH, -1);
                result -= 1;
            }
        }
        return result;
    }
498646
def yesterday(self) -> datetime:
        
        self.value = datetime.today() - timedelta(days=1)
        return self.value
609325
public int compareTo(final ChronoIndexData info)
	{

		long value;

		if (chronoSort) {
			value = this.time - info.time;
		}
		else {
			value = this.revisionCounter - info.revisionCounter;
		}

		if (value == 0) {
			return 0;
		}
		else if (value > 0) {
			return 1;
		}
		else {
			return -1;
		}
	}
1179541
public static int todayYYMMDDHHmm() {
        java.time.LocalDateTime today = java.time.LocalDateTime.now();
        return today.getYear() % 100 * 100_00_00_00 + today.getMonthValue() * 100_00_00 + today.getDayOfMonth() * 100_00
            + today.getHour() * 100 + today.getMinute();
    }
178986
function compareTimeZones(a, b) {
    if (typeof a !== 'string' || typeof b !== 'string') {
      return NaN;
    }

    return normalizeIso8601TimeZone(a) - normalizeIso8601TimeZone(b);
  }
470529
def get_day():
    """"""
    day = datetime.datetime.today().weekday()
    if len(sys.argv) == 3:
        if sys.argv[2] == "mon":
            day = 0
        elif sys.argv[2] == "tue":
            day = 1
        elif sys.argv[2] == "wed":
            day = 2
        elif sys.argv[2] == "thur":
            day = 3
        elif sys.argv[2] == "fri":
            day = 4
        else:
            day = 5
    if day > 4:
        print("There is no information about the menu today.")
        exit(5)
    return day
1196503
def next_working_day(count = 1)
      return self if count == 0
      negative = count < 0
      count = count.abs
      date = negative ? yesterday : tomorrow
      
      loop do
        count -= 1 if date.working_day?
        return date if count.zero? 
        
        date += (negative ? -1 : 1).day
      end
    end
1340417
public static boolean compare(Time aValue, Time bValue, CompareWay compareWay) {
        String value = Formatter.datetimeToCustomString(aValue, TIME_FORMAT);
        int result = value.compareTo(Formatter.datetimeToCustomString(bValue, TIME_FORMAT));
        switch (compareWay) {
            case EQ:
                return result == 0;
            case GT:
                return result > 0;
            default:
                return result < 0;
        }
    }
138310
def _revs_equal(rev1, rev2, rev_type):
    '''
    
    '''
    if (rev1 is None and rev2 is not None) \
            or (rev2 is None and rev1 is not None):
        return False
    elif rev1 is rev2 is None:
        return True
    elif rev_type == 'sha1':
        return rev1.startswith(rev2)
    else:
        return rev1 == rev2