mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/new-tz-handling] Fix documentation in includes/datetime.php
PHPBB3-9558
This commit is contained in:
parent
9836efc13c
commit
fb77b6b70c
1 changed files with 8 additions and 7 deletions
|
@ -2,9 +2,8 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
* @version $Id$
|
* @copyright (c) 2012 phpBB Group
|
||||||
* @copyright (c) 2010 phpBB Group
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,10 +83,12 @@ class phpbb_datetime extends DateTime
|
||||||
|
|
||||||
if ($relative)
|
if ($relative)
|
||||||
{
|
{
|
||||||
// Check the delta is less than or equal to 1 hour
|
/**
|
||||||
// and the delta not more than a minute in the past
|
* Check the delta is less than or equal to 1 hour
|
||||||
// and the delta is either greater than -5 seconds or timestamp and current time are of the same minute (they must be in the same hour already)
|
* and the delta not more than a minute in the past
|
||||||
// finally check that relative dates are supported by the language pack
|
* and the delta is either greater than -5 seconds or timestamp and current time are of the same minute (they must be in the same hour already)
|
||||||
|
* finally check that relative dates are supported by the language pack
|
||||||
|
*/
|
||||||
if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60)) && isset($this->user->lang['datetime']['AGO']))
|
if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60)) && isset($this->user->lang['datetime']['AGO']))
|
||||||
{
|
{
|
||||||
return $this->user->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
|
return $this->user->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue