mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-24 09:30:34 +01:00
Merge pull request #5037 from hubaishan/ticket/14857
[ticket/14857] Throw `S` from dateformat for non English languages
This commit is contained in:
commit
8f662eac40
@ -60,6 +60,12 @@ class datetime extends \DateTime
|
||||
public function format($format = '', $force_absolute = false)
|
||||
{
|
||||
$format = $format ? $format : $this->user->date_format;
|
||||
|
||||
if (substr($this->user->lang_name, 0,2) != 'en')
|
||||
{
|
||||
$format = preg_replace('/([^\\\])S/','$1', $format);
|
||||
}
|
||||
|
||||
$format = self::format_cache($format, $this->user);
|
||||
$relative = ($format['is_short'] && !$force_absolute);
|
||||
$now = new self($this->user, 'now', $this->user->timezone);
|
||||
|
Loading…
x
Reference in New Issue
Block a user