1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-10 01:25:33 +02:00

[feature/new-tz-handling] Added phpbb_datetime::__toString().

New phpbb_datetime::__toString() magic method that formats the datetime
according to the users default settings.

PHPBB3-9558
This commit is contained in:
Chris Smith 2010-07-07 22:24:43 +01:00 committed by Oleg Pudeyev
parent c521ef1591
commit dba89a5341

View File

@ -124,6 +124,16 @@ class phpbb_datetime extends DateTime
return strtr(parent::format($format['format_long']), $format['lang']);
}
/**
* Magic method to convert DateTime object to string
*
* @return Formatted date time, according to the users default settings.
*/
public function __toString()
{
return $this->format();
}
/**
* Pre-processes the specified date format
*