phpBB

Code Changes

File: phpbb/datetime.php

  Unmodified   Added   Modified   Removed
Line 57Line 57
	* @param boolean $force_absolute Force output of a non relative date
* @return string Formatted date time
*/

	* @param boolean $force_absolute Force output of a non relative date
* @return string Formatted date time
*/

 
	#[\ReturnTypeWillChange]

	public function format($format = '', $force_absolute = false)
{
$format = $format ? $format : $this->user->date_format;

	public function format($format = '', $force_absolute = false)
{
$format = $format ? $format : $this->user->date_format;

Line 97Line 98

$midnight = $midnight->getTimestamp();



$midnight = $midnight->getTimestamp();


				if ($timestamp <= $midnight + 2 * 86400)

				if ($timestamp < $midnight + 2 * 86400)

				{
$day = false;


				{
$day = false;


					if ($timestamp > $midnight + 86400)

					if ($timestamp >= $midnight + 86400)

					{
$day = 'TOMORROW';
}

					{
$day = 'TOMORROW';
}

					else if ($timestamp > $midnight)

					else if ($timestamp >= $midnight)

					{
$day = 'TODAY';
}

					{
$day = 'TODAY';
}

					else if ($timestamp > $midnight - 86400)

					else if ($timestamp >= $midnight - 86400)

					{
$day = 'YESTERDAY';
}

					{
$day = 'YESTERDAY';
}