Habari\DateTime::text_format PHP Метод

text_format() публичный Метод

Example: echo DateTime::create('2010-01-01')->text_format('The year was {Y}.'); Expected output: The year was 2010.
public text_format ( string $format ) : string
$format string A string with single-character date format codes {@link http://php.net/date date()} surrounded by braces
Результат string The string with date components inserted
    public function text_format($format)
    {
        return preg_replace_callback('%\\{(\\w)\\}%iu', array($this, 'text_format_callback'), $format);
    }