Format date to human readable when date is yesterday

@param object $parsedTxt Texts returned by humanReadable method

@return void
354166
protected function humanDateYesterday($parsedTxt)
    {
        $currentClass    = get_called_class();
        $parsedTxt->date = $currentClass::$humanReadableI18n['yesterday'];
        $parsedTxt->time = $currentClass::$humanReadableI18n['time_part'];
        
        $time = $this->format($currentClass::$humanReadableFormats['time']);
        
        $this->humanParseDateAndTimeText($parsedTxt, '', $time);
    }
328223
private function parseDate($text)
    {
        if (empty($text) || '-' == $text) {
            return null;
        }

        $date = \DateTime::createFromFormat('d/m/Y', $text);

        return false === $date ? null : $date->format('Y-m-d').'T00:00:00.000Z';
    }
1193124
public static function fromFormat(string $format, string $timeString) : TimeOfDay
    {
        return self::fromNative(\DateTimeImmutable::createFromFormat($format, $timeString));
    }
1050712
private function parseDate()
    {
        $todayDateTime = strtotime(date('Y-m-d H:00:00'));
        if($todayDateTime !== $this->currentFileDateTime)
        {
            $this->getNewDateFileName($todayDateTime);
        }
    }
372607
public static function formatDate($format, $timestamp)
    {
        static $datesPatterns = null;
        static $timesPatterns = null;

        if ($datesPatterns === null || $timesPatterns === null) {
            $datesPatterns = "/\b(" . implode('|', array_keys(static::$_map['date'])) . ")\b(?![^']*'(?:(?:[^']*'){2})*[^']*$)/i";
            $timesPatterns = "/\b(" . implode('|', array_keys(static::$_map['time'])) . ")\b(?![^']*'(?:(?:[^']*'){2})*[^']*$)/i";
        }

        // normalize formats
        $result = preg_replace_callback($datesPatterns, function ($matches) use ($timestamp) {
            return date(static::$_map['date'][$matches[1]], $timestamp);
        }, trim($format));

        $result = preg_replace_callback($timesPatterns, function ($matches) use ($timestamp) {
            return date(static::$_map['time'][$matches[1]], $timestamp);
        }, $result);

        return str_replace('\'', '', $result);
    }
71814
def process_date_updated(self, text):
        """"""
        date = parse(text)
        if self.date_updated == 'N/A':
            self.date_updated = date
        if date > self.date_updated:
            self.date_updated = date
532
function indateto($content){
        if (strlen($content) < 8) { // State exit or missing parameter.
            return true;
        }
        // Strip off the dateto: part and add the reminder to the parsed token array
        $param = trim(substr($content,7));
        $this->tokens[] = new search_token(TOKEN_DATETO,$param);
        return true;
    }
636187
def yesterday(date=None):
    """"""
    if not date:
        return _date - datetime.timedelta(days=1)
    else:
        current_date = parse(date)
        return current_date - datetime.timedelta(days=1)
1318156
public static function ToDate($Timestamp = '') {
      if ($Timestamp == '')
         $Timestamp = time();
      elseif (!is_numeric($Timestamp))
         $Timestamp = self::ToTimestamp($Timestamp);

      return date('Y-m-d', $Timestamp);
   }
642000
public function setUntil($ts) {
		if ($ts instanceof DateTime) {
			$dt = $ts;
		} else if (is_int($ts)) {
			$dt = new DateTime('@' . $ts);
		} else {
			$dt = new DateTime($ts);
		}
		$this->until = $dt->format('Ymd\THisO');
		$this->rrule['until'] = $this->until;
	}
1145496
function(inst, datesText) {
			if (datesText === inst.lastVal) {
				return;
			}
			inst.lastVal = datesText;
			datesText = datesText.split(inst.options.multiSelect ? inst.options.multiSeparator :
				(inst.options.rangeSelect ? inst.options.rangeSeparator : '\x00'));
			var dates = [];
			for (var i = 0; i < datesText.length; i++) {
				try {
					var date = inst.options.calendar.parseDate(inst.get('dateFormat'), datesText[i]);
					if (date) {
						var found = false;
						for (var j = 0; j < dates.length; j++) {
							if (dates[j].compareTo(date) === 0) {
								found = true;
								break;
							}
						}
						if (!found) {
							dates.push(date);
						}
					}
				}
				catch (e) {
					// Ignore
				}
			}
			dates.splice(inst.options.multiSelect || (inst.options.rangeSelect ? 2 : 1), dates.length);
			if (inst.options.rangeSelect && dates.length === 1) {
				dates[1] = dates[0];
			}
			return dates;
		}
401272
protected function humanDateOther($parsedTxt, \DateTime $current)
    {
        $currentClass = get_called_class();
        
        $dateFormat = $currentClass::$humanReadableFormats['dateDifferentYear'];
        if ($current->format('Y') === $this->format('Y')) {
            $dateFormat = $currentClass::$humanReadableFormats['dateSameYear'];
        }
        
        $parsedTxt->date = $currentClass::$humanReadableI18n['others'];
        $parsedTxt->time = $currentClass::$humanReadableI18n['time_part'];
        
        $date = $this->format($dateFormat);
        $time = $this->format($currentClass::$humanReadableFormats['time']);
        
        $this->humanParseDateAndTimeText($parsedTxt, $date, $time);
    }
1152449
private function setTodayHijriDate()
    {
        $today = $this->convertTodayToHijri();
        $this->arYear = (int)$today['arYear'];
        $this->arMonth = (int)$today['arMonth'];
        $this->arDay = (int)$today['arDay'];
    }
271924
public static function clearDate($ts = null)
	{
		// default to now
		if ($ts === null) $ts = sfDateTimeToolkit::now();
		
		list($H, $i, $s, $m, $d, $Y) = sfDateTimeToolkit::breakdown($ts);
		
		return mktime($H, $i, $s, 0, 0, 0);
	}
200144
public function setCreatedAt($createdAt)
    {
        if ($createdAt instanceof \DateTime
            || (is_object($createdAt) && method_exists($createdAt, 'format'))) {
            $this->createdAt = $createdAt->format('Y-m-d H:i:s');
        } else {
            $this->createdAt = $createdAt;
        }
    }
597918
private function formatByDayGrouping($value)
    {
        $value = $this->getTimestamp($value);
        if ('' === $value) {
            return '-';
        }
        $event = new ParseDateEvent($value, Config::get('dateFormat'));
        $this->dispatcher->dispatch(ContaoEvents::DATE_PARSE, $event);

        return $event->getResult();
    }
454179
private function setIssuedAt($issuedAt)
    {
        if (1 !== \preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/', $issuedAt)) {
            throw new AccessTokenException('invalid "expires_at" (syntax)');
        }

        // make sure it is actually a valid date
        try {
            $this->issuedAt = new DateTime($issuedAt);
        } catch (Exception $e) {
            throw new AccessTokenException(
                \sprintf('invalid "expires_at": %s', $e->getMessage())
            );
        }
    }