[feature/new-tz-handling] Renamed old variables and removed extra conditional.

PHPBB3-9558
This commit is contained in:
Chris Smith 2010-04-20 19:30:05 +01:00 committed by Oleg Pudeyev
parent e8b60fc3d8
commit a5c3ff3769

View file

@ -88,21 +88,17 @@ class phpbb_datetime extends DateTime
$midnight->setTime(0, 0, 0);
$midnight = $midnight->getTimestamp();
$gmepoch = $this->getTimestamp();
$timestamp = $this->getTimestamp();
if (!($gmepoch < $midnight - 86400 || $gmepoch > $midnight + 172800))
{
$day = false;
if ($gmepoch > $midnight + 86400)
if ($timestamp > $midnight + 86400)
{
$day = 'TOMORROW';
}
else if ($gmepoch > $midnight)
else if ($timestamp > $midnight)
{
$day = 'TODAY';
}
else if ($gmepoch > $midnight - 86400)
else if ($timestamp > $midnight - 86400)
{
$day = 'YESTERDAY';
}
@ -115,7 +111,6 @@ class phpbb_datetime extends DateTime
}
}
}
}
$format = self::_format_cache($format, $this->_user);