diff options
Diffstat (limited to 'phpBB/includes/datetime.php')
-rw-r--r-- | phpBB/includes/datetime.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/datetime.php b/phpBB/includes/datetime.php index 577081e40b..8763697c78 100644 --- a/phpBB/includes/datetime.php +++ b/phpBB/includes/datetime.php @@ -125,6 +125,16 @@ class phpbb_datetime extends DateTime } /** + * 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 * * @param string $format Output format |