protected function humanDateToday($parsedTxt, \DateInterval $diff)
    {
        $textKey = 'today_past';
        if ($diff->invert === 1) {
            $textKey = 'today_future';
        }
        
        $time = '';
        if ($diff->h === 0 && $diff->i === 0) {
            $time .= $diff->s.'s';
        } elseif ($diff->h === 0) {
            $time .= $diff->i.'min';
        } else {
            $time .= $diff->h.'h';
        }
        
        $currentClass    = get_called_class();
        $parsedTxt->date = $currentClass::$humanReadableI18n[$textKey];
        
        $this->humanParseDateAndTimeText($parsedTxt, '', $time);
    }
protected function humanDateToday($parsedTxt, \DateInterval $diff)
    {
        $textKey = 'today_past';
        if ($diff->invert === 1) {
            $textKey = 'today_future';
        }
        
        $time = '';
        if ($diff->h === 0 && $diff->i === 0) {
            $time .= $diff->s.'s';
        } elseif ($diff->h === 0) {
            $time .= $diff->i.'min';
        } else {
            $time .= $diff->h.'h';
        }
        
        $currentClass    = get_called_class();
        $parsedTxt->date = $currentClass::$humanReadableI18n[$textKey];
        
        $this->humanParseDateAndTimeText($parsedTxt, '', $time);
    }
protected function humanDateToday ( $ parsedTxt , \ DateInterval $ diff ) { $ textKey = 'today_past' ; if ( $ diff -> invert === 1 ) { $ textKey = 'today_future' ; } $ time = '' ; if ( $ diff -> h === 0 && $ diff -> i === 0 ) { $ time .= $ diff -> s . 's' ; } elseif ( $ diff -> h === 0 ) { $ time .= $ diff -> i . 'min' ; } else { $ time .= $ diff -> h . 'h' ; } $ currentClass = get_called_class ( ) ; $ parsedTxt -> date = $ currentClass :: $ humanReadableI18n [ $ textKey ] ; $ this -> humanParseDateAndTimeText ( $ parsedTxt , '' , $ time ) ; }
Format date to human readable when date is today

@param object $parsedTxt Texts returned by humanReadable method
@param \DateInterval $diff Interval between now and date to read

@return void
Format date to human readable when date is today