[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch




/phpbb/ -> datetime.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 168 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

datetime:: (4 methods):

Class: datetime  - X-Ref

phpBB custom extensions to the PHP DateTime class
This handles the relative formats phpBB employs

__construct($user, $time = 'now', \DateTimeZone $timezone = null)   X-Ref
Constructs a new instance of \phpbb\datetime, expanded to include an argument to inject
the user context and modify the timezone to the users selected timezone if one is not set.

param: user $user object for context.
param: string $time String in a format accepted by strtotime().
param: \DateTimeZone $timezone Time zone of the time.

format($format = '', $force_absolute = false)   X-Ref
Formats the current date time into the specified format

param: string $format Optional format to use for output, defaults to users chosen format
param: boolean $force_absolute Force output of a non relative date
return: string Formatted date time

__toString()   X-Ref
Magic method to convert DateTime object to string

return: string Formatted date time, according to the users default settings.

format_cache($format, $user)   X-Ref
Pre-processes the specified date format

param: string $format Output format
param: user $user User object to use for localisation
return: array Processed date format

Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1