Get date.

@param \simplehtmldom_1_5\simple_html_dom $each_recom

@return string
778078
private function getDate($each_recom)
    {
        $date = $each_recom->find('table', 0)->next_sibling()->next_sibling()->plaintext;
        $date = explode('-', $date);

        return trim($date[1]);
    }
512132
public static function obtainDate(string $rfc): int
    {
        // rfc is multibyte
        $begin = (mb_strlen($rfc) === 12) ? 3 : 4;
        // strdate is not multibyte
        $strdate = strval(mb_substr($rfc, $begin, 6));
        $parts = str_split($strdate, 2);
        // year 2000 is leap year (%4 & %100 & %400)
        /** @var int|false $date phpstan does not know that mktime can return false */
        $date = mktime(0, 0, 0, (int) $parts[1], (int) $parts[2], (int) ('20' . $parts[0]));
        if (false === $date) {
            return 0;
        }
        if (date('ymd', $date) !== $strdate) {
            return 0;
        }
        return $date;
    }
862750
public function get_updated_gmdate($date_format = 'j F Y, g:i a')
	{
		$date = $this->get_updated_date('U');
		if ($date === null)
		{
			return null;
		}

		return gmdate($date_format, $date);
	}
1087450
public function getTime(string $format = null)
    {
        $time = $this->time + $this->offset;

        if (!is_null($format)) {
            return date($format, $time);
        }

        return $time;
    }
1005804
private function getFavType($each_fav)
    {
        $temp_type = $each_fav->find('span', 0)->plaintext;
        $temp_type = explode('·', $temp_type);

        return trim($temp_type[0]);
    }
497613
public function getDateTime(string $date, string $pattern = "Y-m-d H:i:s")
    {
        if (!$date)
            $this->data = date($pattern);
        else
            $this->prepareDateTime($date);

        if($this->erro || !isset($this->data['ano']) || !isset($this->data['mes']) || !isset($this->data['dia'])) {
            return null;
        } else {
            $strtoTime = "";
            if (isset($this->data['h']) && $this->data['h'] > 11) {
                $this->data['h'] -= 12;
                $strtoTime = "+12hours";
            }

            $originalDate = $this->data['ano'] . '-' . $this->data['mes'] . '-' . $this->data['dia'] . " " . ($this->data['h'] ?? 0) . ":" . ($this->data['i'] ?? 0) . ":" . ($this->data['s'] ?? 0);
            return date($pattern, strtotime($originalDate . $strtoTime));
        }
    }
1182259
public Date getDate(String name, String format) {
        Object value = get(name);
        if (value instanceof Date) {
            return (Date)value;
        }
        
        if (value != null) {
            try {
                return new SimpleDateFormat(format).parse(value.toString());
            } catch (ParseException e) {
                // ignore
            }
        }
        return null;
    }
323899
public function getDate($date = null, $format = 'Y-m-d H:i:s')
    {
        if (strlen($date) < 0) {
            $date = date('d-m-Y H:i:s');
        }

        $timeStamp = new DateTime($date);
        return $timeStamp->format($format);
    }
429522
public function getStartDate() : ?string 
    {
        if ( ! $this->hasStartDate()) {
            $this->setStartDate($this->getDefaultStartDate());
        }
        return $this->startDate;
    }
1162736
public static function getDateFormat($noTime = false, $useTimezone = false, $useUtc = false)
    {
        // Do not use UTC time (Z) if timezone support is enabled.
        if ($useTimezone || !$useUtc) {
            return $noTime ? 'Ymd' : 'Ymd\THis';
        }

        return $noTime ? 'Ymd' : 'Ymd\THis\Z';
    }
395288
public function getDate()
    {
        global $wpdb;
        return $wpdb->get_var($wpdb->prepare('SELECT post_date FROM ' . $wpdb->prefix . 'posts WHERE ID = %d',
            $this->ID));
    }
933718
public static function getDate($path)
    {
        if ($path[0] != "/") {
            $path = Env::path($path, Env::PATH_DOCUMENT_ROOT);
        }

        if (!$exif = exif_read_data($path)) {
            return;
        }

        if (empty($exif["DateTime"])) {
            return;
        }

        if (!$date = strtotime($exif["DateTime"])) {
            return;
        }

        return $date;
    }
1218346
public function getFormattedDate($format, $startDate = true)
    {
        $date = $this->getEndDate();

        // Start date should be formatted?
        if ($startDate) {
            $date = $this->getStartDate();
        }

        // Unknown date or format is invalid?
        // Nothing to do
        if (null === $date || !Date::isValidDateFormat($format)) {
            return '';
        }

        return $date->format($format);
    }
534309
public function getDate($format = null)
    {
        $format = empty($format) ? $this->format : $format;

        return strftime($format, $this->ts);
    }
898764
public function getEasterDate()
    {
        $easter = new \DateTime($this->getYear() . '-03-21');
        $days   = easter_days($this->getYear());

        return $easter->add(new DateInterval('P' . $days . 'D'));
    }
135748
public function getAllDateFormat()
    {
        $aFormats = static::FORMAT_DATE;
        $oNow     = Factory::factory('DateTime');
        foreach ($aFormats as &$aFormat) {
            $aFormat          = (object) $aFormat;
            $aFormat->example = $oNow->format($aFormat->format);
        }
        return $aFormats;
    }
376320
public function getBirthDate(): Date
    {
        foreach ($this->getAllBirthDates() as $date) {
            if ($date->isOK()) {
                return $date;
            }
        }

        return new Date('');
    }