mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
[ticket/16823] Make datetime class correctly handle edge cases
PHPBB3-16823
This commit is contained in:
@@ -101,15 +101,15 @@ class datetime extends \DateTime
|
||||
{
|
||||
$day = false;
|
||||
|
||||
if ($timestamp > $midnight + 86400)
|
||||
if ($timestamp >= $midnight + 86400)
|
||||
{
|
||||
$day = 'TOMORROW';
|
||||
}
|
||||
else if ($timestamp > $midnight)
|
||||
else if ($timestamp >= $midnight)
|
||||
{
|
||||
$day = 'TODAY';
|
||||
}
|
||||
else if ($timestamp > $midnight - 86400)
|
||||
else if ($timestamp >= $midnight - 86400)
|
||||
{
|
||||
$day = 'YESTERDAY';
|
||||
}
|
||||
|
Reference in New Issue
Block a user