[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch

title

Body

[close]

/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):
  __construct()
  format()
  __toString()
  format_cache()


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

return: string Formatted date time
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

__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

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



Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1