public function localeFormat(string $format): string
    {
        // http://php.net/manual/en/function.strftime.php#refsect1-function.strftime-examples
        // Example #3 Cross platform compatible example using the %e modifier
        // @codeCoverageIgnoreStart
        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
            $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format);
        }
        // @codeCoverageIgnoreEnd

        return strftime($format, $this->timestamp());
    }
public function localeFormat(string $format): string
    {
        // http://php.net/manual/en/function.strftime.php#refsect1-function.strftime-examples
        // Example #3 Cross platform compatible example using the %e modifier
        // @codeCoverageIgnoreStart
        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
            $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format);
        }
        // @codeCoverageIgnoreEnd

        return strftime($format, $this->timestamp());
    }
public function localeFormat ( string $ format ) : string { // http://php.net/manual/en/function.strftime.php#refsect1-function.strftime-examples // Example #3 Cross platform compatible example using the %e modifier // @codeCoverageIgnoreStart if ( strtoupper ( substr ( PHP_OS , 0 , 3 ) ) == 'WIN' ) { $ format = preg_replace ( '#(?<!%)((?:%%)*)%e#' , '\1%#d' , $ format ) ; } // @codeCoverageIgnoreEnd return strftime ( $ format , $ this -> timestamp ( ) ) ; }
Retrieves localized formatted string representation

Returns string formatted according to PHP strftime() function. Set the
current locale using the setlocale() function.

@link http://php.net/strftime PHP strftime function
@link http://php.net/setlocale PHP setlocale function

@param string $format The format string

@return string
Retrieves localized formatted string representation