diff options
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/composer/installed.json | 8 | ||||
-rw-r--r-- | vendor/composer/installed.php | 6 | ||||
-rw-r--r-- | vendor/php81_bc/strftime/.gitignore | 1 | ||||
-rw-r--r-- | vendor/php81_bc/strftime/src/IntlLocaleFormatter.php | 4 | ||||
-rw-r--r-- | vendor/php81_bc/strftime/src/php-8.1-strftime.php | 19 |
5 files changed, 22 insertions, 16 deletions
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 18e58e0f3..cd40aede8 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -337,12 +337,12 @@ "source": { "type": "git", "url": "https://github.com/alphp/strftime.git", - "reference": "88e98f00b5d9247e8168c1eb528ab138fbf743d2" + "reference": "dcd30543db16c9b4ba095f6bf32ac16f15eb9448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alphp/strftime/zipball/88e98f00b5d9247e8168c1eb528ab138fbf743d2", - "reference": "88e98f00b5d9247e8168c1eb528ab138fbf743d2", + "url": "https://api.github.com/repos/alphp/strftime/zipball/dcd30543db16c9b4ba095f6bf32ac16f15eb9448", + "reference": "dcd30543db16c9b4ba095f6bf32ac16f15eb9448", "shasum": "" }, "require": { @@ -354,7 +354,7 @@ "suggest": { "ext-intl": "For proper locale aware output" }, - "time": "2024-01-26T18:19:38+00:00", + "time": "2025-05-20T20:04:36+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index cd710941f..7a6b0599c 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'dokuwiki/dokuwiki', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '59a6ba95c8c7b11b3a1e341c41942ec083784be0', + 'reference' => '396ae2b1e4ac18cd8a3de8ba055f983a807687dc', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,7 +22,7 @@ 'dokuwiki/dokuwiki' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '59a6ba95c8c7b11b3a1e341c41942ec083784be0', + 'reference' => '396ae2b1e4ac18cd8a3de8ba055f983a807687dc', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -79,7 +79,7 @@ 'php81_bc/strftime' => array( 'pretty_version' => 'dev-fallback-intl', 'version' => 'dev-fallback-intl', - 'reference' => '88e98f00b5d9247e8168c1eb528ab138fbf743d2', + 'reference' => 'dcd30543db16c9b4ba095f6bf32ac16f15eb9448', 'type' => 'library', 'install_path' => __DIR__ . '/../php81_bc/strftime', 'aliases' => array(), diff --git a/vendor/php81_bc/strftime/.gitignore b/vendor/php81_bc/strftime/.gitignore index a5b812048..659557e1b 100644 --- a/vendor/php81_bc/strftime/.gitignore +++ b/vendor/php81_bc/strftime/.gitignore @@ -23,6 +23,7 @@ Thumbs.db ####################### /.vscode /composer.lock +.phpunit.result.cache # vim *~ *.swp diff --git a/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php b/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php index 5bb62e425..783a0c103 100644 --- a/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php +++ b/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php @@ -14,9 +14,9 @@ class IntlLocaleFormatter extends AbstractLocaleFormatter /** @var string[] strftime to ICU placeholders */ protected $formats = [ - '%a' => 'EEE', // An abbreviated textual representation of the day Sun through Sat + '%a' => 'ccc', // An abbreviated textual representation of the day Sun through Sat '%A' => 'EEEE', // A full textual representation of the day Sunday through Saturday - '%b' => 'MMM', // Abbreviated month name, based on the locale Jan through Dec + '%b' => 'LLL', // Abbreviated month name, based on the locale Jan through Dec '%B' => 'MMMM', // Full month name, based on the locale January through December '%h' => 'MMM', // Abbreviated month name, based on the locale (an alias of %b) Jan through Dec ]; diff --git a/vendor/php81_bc/strftime/src/php-8.1-strftime.php b/vendor/php81_bc/strftime/src/php-8.1-strftime.php index f8a8c79cd..75a6bb351 100644 --- a/vendor/php81_bc/strftime/src/php-8.1-strftime.php +++ b/vendor/php81_bc/strftime/src/php-8.1-strftime.php @@ -2,10 +2,13 @@ namespace PHP81_BC; use DateTime; - use DateTimeInterface; use DateTimeZone; + use DateTimeInterface; use Exception; use InvalidArgumentException; + use Locale; + use PHP81_BC\strftime\DateLocaleFormatter; + use PHP81_BC\strftime\IntlLocaleFormatter; /** * Locale-formatted strftime using IntlDateFormatter (PHP 8.1 compatible) @@ -22,7 +25,9 @@ * * @param string $format Date format * @param integer|string|DateTime $timestamp Timestamp + * @param string|null $locale locale * @return string + * @throws InvalidArgumentException * @author BohwaZ <https://bohwaz.net/> */ function strftime (string $format, $timestamp = null, ?string $locale = null) : string { @@ -34,15 +39,15 @@ } catch (Exception $e) { throw new InvalidArgumentException('$timestamp argument is neither a valid UNIX timestamp, a valid date-time string or a DateTime object.', 0, $e); } - } - $timestamp->setTimezone(new DateTimeZone(date_default_timezone_get())); + $timestamp->setTimezone(new DateTimeZone(date_default_timezone_get())); + } if (class_exists('\\IntlDateFormatter') && !isset($_SERVER['STRFTIME_NO_INTL'])) { - $locale = \Locale::canonicalize($locale ?? setlocale(LC_TIME, '0')); - $locale_formatter = new \PHP81_BC\strftime\IntlLocaleFormatter($locale); + $locale = Locale::canonicalize($locale ?? (Locale::getDefault() ?? setlocale(LC_TIME, '0'))); + $locale_formatter = new IntlLocaleFormatter($locale); } else { - $locale_formatter = new \PHP81_BC\strftime\DateLocaleFormatter($locale); + $locale_formatter = new DateLocaleFormatter($locale); } // Same order as https://www.php.net/manual/en/function.strftime.php @@ -151,7 +156,7 @@ case '#': case '-': // remove leading zeros but keep last char if also zero - return preg_replace('/^0+(?=.)/', '', $result); + return preg_replace('/^[0\s]+(?=.)/', '', $result); } return $result; |