src/mako/utility/Humanizer.php
public function day(DateTimeInterface $dateTime, string $dateFormat = 'Y-m-d, H:i'): string
	{
		if($dateTime->format('Y-m-d') === date('Y-m-d'))
		{
			return $this->i18n->get('humanizer.today');
		}
		elseif($dateTime->format('Y-m-d') === date('Y-m-d', time() - (60 * 60 * 24)))
		{
			return $this->i18n->get('humanizer.yesterday');
		}
		elseif($dateTime->format('Y-m-d') === date('Y-m-d', time() + (60 * 60 * 24)))
		{
			return $this->i18n->get('humanizer.tomorrow');
		}
		else
		{
			return $dateTime->format($dateFormat);
		}
	}
public function day(DateTimeInterface $dateTime, string $dateFormat = 'Y-m-d, H:i'): string
	{
		if($dateTime->format('Y-m-d') === date('Y-m-d'))
		{
			return $this->i18n->get('humanizer.today');
		}
		elseif($dateTime->format('Y-m-d') === date('Y-m-d', time() - (60 * 60 * 24)))
		{
			return $this->i18n->get('humanizer.yesterday');
		}
		elseif($dateTime->format('Y-m-d') === date('Y-m-d', time() + (60 * 60 * 24)))
		{
			return $this->i18n->get('humanizer.tomorrow');
		}
		else
		{
			return $dateTime->format($dateFormat);
		}
	}
public function day ( DateTimeInterface $ dateTime , string $ dateFormat = 'Y-m-d, H:i' ) : string { if ( $ dateTime -> format ( 'Y-m-d' ) === date ( 'Y-m-d' ) ) { return $ this -> i18n -> get ( 'humanizer.today' ) ; } elseif ( $ dateTime -> format ( 'Y-m-d' ) === date ( 'Y-m-d' , time ( ) - ( 60 * 60 * 24 ) ) ) { return $ this -> i18n -> get ( 'humanizer.yesterday' ) ; } elseif ( $ dateTime -> format ( 'Y-m-d' ) === date ( 'Y-m-d' , time ( ) + ( 60 * 60 * 24 ) ) ) { return $ this -> i18n -> get ( 'humanizer.tomorrow' ) ; } else { return $ dateTime -> format ( $ dateFormat ) ; } }
Returns a human friendly representation of the date.

@param  \DateTimeInterface $dateTime   DateTime object
@param  string             $dateFormat Default date format
@return string
Returns a human friendly representation of the date .