Produces "days ago" if diff is between 60 minutes and 24 hours to the past

@return RuleInterface
166921
public static function hoursAgo()
    {
        return self::getOrCreate('hours-ago', function () {
            return RangeRule::createForNegativeValues(Unit::HOUR, Unit::DAY - 1, [Results::class, 'calculateHoursAgo']);
        });
    }
37240
public static function ruleDate()
    {
        return function ($input) {
            $date = null;
            try {
                $date = date_parse($input);
                if ($date['warning_count'] === 0 && $date['error_count'] === 0) {
                    return strlen($date['hour']) === 0;
                }
                else {
                    return false;
                }
            }
            catch(\Exception $e) {
                return false;
            }
        };
    }
252294
def previous_day(self):
        """"""
        return HDate(self.gdate + datetime.timedelta(-1), self.diaspora,
                     self.hebrew)
826960
function() {
    var time = null;

    if (this.method === 'from now') {
      time = ago.fromNow(this.amount, this.unit);
    } else if (this.method === 'ago') {
      time = ago(this.amount, this.unit);
    } else {
      throw new Error('Invalid method: ' + this.method);
    }

    return new Date(time);
  }
1266585
public function getLockoutDate()
    {
        if ($timestamp = $this->getLockoutTimestamp()) {
            return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
        }
    }
856077
public function getDateInterval()
    {
        if ( !$this->from && !$this->to ) {
            return null;
        }
        return $this->from->diff($this->to);
    }
16621
public function setCurrentTime(): self
	{
		return $this->modifyClone()->setTime((int) date('H'), (int) date('i'), (int) date('s'));
	}
522929
public function getLastFeedExportDate()
    {
        $file = new SplFileInfo($this->config->getDefaultFeedFile());
        if (!$file->isFile()) {
            return null;
        }

        return new DateTime('@' . $file->getMTime());
    }
455633
protected function get_previous_day_data() {
        $type = $this->related['type'];
        $time = $type->get_prev_day($this->calendar->time);

        return $type->timestamp_to_date_array($time);
    }
25466
public function getLastRead(): \DateTime
    {
        if ($this->caching == false) {
            return \DateTime::createFromFormat("F d Y H:i:s.", date("F d Y H:i:s.", fileatime($this->getAbsoluteFilePath())));
        }

        if ($this->lastRead == null) {
            $this->lastRead = \DateTime::createFromFormat("F d Y H:i:s.", date("F d Y H:i:s.", fileatime($this->getAbsoluteFilePath())));
        }

        return $this->lastRead;
    }
898135
public function getStartDate() {
        $now = $this->getNow();
        $endOfDay = $this->getToday()->modify('+18 hours');

        $currentDay = $this->getToday();

        if($now > $endOfDay) {
            $currentDay->modify('+1 day');
        }

        return $currentDay;
    }
960160
public function isExpired()
    {
        if (null === $this->expiresAt) {
            return false;
        }

        $now = new \DateTime();

        return $this->expiresAt < $now;
    }
370022
protected function validateCurrentDate()
    {
        if ($this->current === null) {
            $this->rewind();
        }

        // Check after the first rewind to avoid repeating the initial validation.
        if ($this->validationResult !== null) {
            return $this->validationResult;
        }

        return $this->validationResult = $this->checkFilters();
    }
1202762
public static function getDateWeekAgo()
    {
        // today
        $date = new \DateTime(date('Y-m-d'));
        // minus 7 days
        $date = $date->sub(new \DateInterval('P7D'));
        return $date->format('Y-m-d');
    }
537125
public function isExpired()
    {
        $createdSeconds = strtotime($this->Created);

        $validForSeconds = (int) $this->ValidForDays * 24 * 60 * 60;

        $nowSeconds = DBDatetime::now()->getTimestamp();

        return ($createdSeconds + $validForSeconds) <= $nowSeconds;
    }
399477
protected function getModifiedSince() : \DateTime
    {
        if (is_null($this->since)) {
            $this->since = new \DateTime('@0');
        }

        return $this->since;
    }
353389
public function getTimeDiff(DateTime $releaseDate)
    {
        $now = new DateTime();

        /** @var DateInterval $diff */
        $diff = $now->diff($releaseDate);

        if ($diff->days > 7) {
            return '';
        }

        if ($diff->days == 7) {
            return 'a week ago';
        }

        if ($diff->days >= 1) {
            return sprintf('%d day(s) ago', $diff->days);
        }

        if ($diff->h >= 1) {
            return sprintf('%d hour(s) ago', $diff->h);
        }

        if ($diff->i >= 1) {
            return sprintf('%d minute(s) ago', $diff->i);
        }

        return 'just now';
    }