format
@param string|null $format
@return bool|string
333465
public function format($format = null) {
        if(is_null($format)) {
            $format = $this->getFormatter()->getDateTimeFormat();
        }
        return date($format, $this->getEpoch());
    }
962685
public function setFormat($format)
    {
        $result = true;
        if (($this->debug === true) && !empty($this->evidence) && isset(Formats::$$this->evidence)) {
            if (array_key_exists($format, array_flip(Formats::$$this->evidence))
                === false) {
                $result = false;
            }
        }
        if ($result === true) {
            $this->format = $format;
            $this->updateApiURL();
        }
        return $result;
    }
396598
public function format($format = self::FORMAT_COMPLETE)
    {
        if (!$this->hasValidFormat()) {
            return false;
        }
        switch ($format) {
            case static::FORMAT_COMPLETE:
                return $this->join(
                    number_format($this->number, 0, null, "."),
                    $this->vn
                );
                break;

            case static::FORMAT_WITH_DASH:
                return $this->join($this->number, $this->vn);
                break;
        }
        return $this->number . $this->vn;
    }
1312634
public function format($format = null)
    {
        if (empty($format)) {
            $format = $this->defaultFormat;
        }
        return $this->formatDatetimeObject($format);
    }
292055
protected function getFormat($format)
    {
        if ($format === false) {
            $format = 'none';
        }
        
        $types = [
            'none' => \IntlDateFormatter::NONE,
            'short' => \IntlDateFormatter::SHORT,
            'medium' => \IntlDateFormatter::MEDIUM,
            'long' => \IntlDateFormatter::LONG,
            'full' => \IntlDateFormatter::FULL
        ];
        
        return isset($types[$format]) ? $types[$format] : null;
    }
1025564
public static function formatDate($date, $format = 'Y-m-d')
    {
        if (!$date) {
            return null;
        }
        $date = new DateTime($date);
        return $date->format($format);
    }
1273811
public function format($format = null) {
        if(is_null($format)) {
            $format = $this->getFormatter()->getCurrentFormat();
        }
        return date($format, $this->getEpoch());
    }
1014072
public function setFormat($format = null)
    {
        if ( ! is_null($format)) {
            self::checkFormat($format);
            $this->format = $format;
        }

        return $this;
    }
1054447
public function format(string $format): string
    {
        return CommonTime::inSeconds($this->seconds)->format($format);
    }
653170
public static function validateDateFormat($format)
    {
        $format = str_replace(array_keys(static::$_map['date']), '', $format); // remove placeholders
        $format = preg_replace("/'(.*)'/", '', $format); // remove literals
        $format = preg_replace('/[^a-z]/i', '', $format);
        $format = trim($format);

        return empty($format);
    }
76974
public function getMetaDateFormatted($format = null)
    {
        if ($this->owner->hasMetaDate()) {
            return $this->owner->getMetaDate()->Format($format ? $format : $this->owner->getMetaDateFormat());
        }
    }
437191
public function format($format = '%d/%m/%Y')
    {
        if ($this->time == null) {
            return false;
        }
        
        return strftime($format, $this->time);
    }
1284254
public function format($format)
    {
        $string = str_replace(' ', '', $this->value());
        for ($i = 0; $i < strlen($string); $i++) {
            $pos = strpos($format, '#');

            // verificar se string eh maior que a qtdade de #.
            if ($pos === false) {
                break;
            }
            $format[$pos] = $string[$i];
        }

        // verificar se sobrou # para trocar
        if (strpos($format, '#') !== false) {
            $format = $this->value();
        }

        $this->value = $format;

        return $this;
    }
340232
protected function checkFormat($format, $type = null)
    {
        return !is_null($format) ? $format : $this->getFormat($type);
    }
1094954
public function toString(string $format = null) : string
    {
        $operations = $this->operations;
        $operations[] = [ 'getImage', [ $format ] ];
        
        $driver = $this->getDriver();
        return array_reduce($operations, function ($carry, $item) use ($driver) {
            return $driver->{$item[0]}(...$item[1]);
        });
    }
93064
public function getMimeType($format) {

		if (NULL === static::$formats) {
			static::initializeFormats();
		}

		return isset(static::$formats[$format]) ? static::$formats[$format][0] : NULL;

	}
1095704
public function date($date, $format = null)
	{
		$datetime = DateTimeUtil::getDateTime($date);
        if (empty($format)) {
			$format = $this->cfg['date_format'];
		}
		if ($format == 'rel') {
			$date = DateTimeUtil::getRelTime($datetime);
		} else {
			$date = $datetime->format($format);
		}
		return $date;
	}