Get the current interval in a human readable format in the current locale.

@return string
487221
public function forHumans()
    {
        $periods = array(
            'year' => $this->years,
            'month' => $this->months,
            'week' => $this->weeks,
            'day' => $this->daysExcludeWeeks,
            'hour' => $this->hours,
            'minute' => $this->minutes,
            'second' => $this->seconds,
        );

        $parts = array();
        foreach ($periods as $unit => $count) {
            if ($count > 0) {
                $parts[] = static::translator()->transChoice($unit, $count, array(':count' => $count));
            }
        }

        return implode(' ', $parts);
    }
309703
public function toDecimal() : string
    {
        $result = (string) $this->epochSecond;

        if ($this->nano !== 0) {
            $nano = (string) $this->nano;
            $nano = str_pad($nano, 9, '0', STR_PAD_LEFT);
            $nano = rtrim($nano, '0');

            $result .= '.' . $nano;
        }

        return $result;
    }
862929
public function getDisplayTimestamp()
    {
        $app = Application::getFacadeApplication();
        $dh = $app->make('helper/date'); /* @var $dh \Concrete\Core\Localization\Service\Date */

        return $dh->formatDateTime($this->time, true, true);
    }
449343
public function currentUtcDatetime()
    {
        if ($this->timeFormat === static::$timeFormatDatetime) {
            return gmdate('Y-m-d H:i:s');
        }
        if ($this->timeFormat === static::$timeFormatTimestamp) {
            return time();
        }
        return null;
    }
1205468
public function calcEndDateTimeBasedOnDuration()
    {
        $duration = $this->Duration;
        $secs = (substr($duration, 0, 2) * 3600) + (substr($duration, 3, 2) * 60);

        $startDate = strtotime($this->StartDateTime);
        $endDate = $startDate + $secs;
        $formatDate = date("Y-m-d H:i:s", $endDate);

        return $formatDate;
    }
996900
private function getCurrentTime()
    {
        list ($msec, $sec) = explode(" ", microtime());
        return (float)$msec + (float)$sec;
    }
200807
public function getIntervalLastLogin()
    {
        if (!$this->lastLogin) return '';
        $now = new \DateTime();
        $interval = $now->diff($this->lastLogin);
        if ($interval->days == 1)
            return $interval->format('%a jour');
        elseif ($interval->days > 1)
            return $interval->format('%a jours');
        elseif ($interval->h == 1)
            return $interval->format('%h heure');
        elseif ($interval->h > 1)
            return $interval->format('%h heures');
        elseif ($interval->i == 1)
            return $interval->format('%i minute');
        else
            return $interval->format('%i minutes');
    }
878828
public function getDurationFormatted()
	{
		$duration = $this->getDuration();

		if ($duration->d == 0 && $duration->h == 0 && $duration->i == 0) {
			return 'Less than minute';
		}

		$ret = '';

		if ($duration->d == 1) {
			$ret .= 'One day';
		} else if ($duration->d > 1) {
			$ret .= $duration->d . ' days';
		}

		if ($duration->h == 1) {
			if (!empty($ret)) {
				$ret .= ', one hour';
			} else {
				$ret .= 'One hour';
			}
		} else if ($duration->h > 1) {
			if (!empty($ret)) {
				$ret .= ', ' . $duration->h . ' hours';
			} else {
				$ret .= $duration->h . ' hours';
			}
		}

		if ($duration->i == 1) {
			if (!empty($ret)) {
				$ret .= ', one minute';
			} else {
				$ret .= 'One minute';
			}
		} else if ($duration->i > 1) {
			if (!empty($ret)) {
				$ret .= ', ' . $duration->i . ' minutes';
			} else {
				$ret .= $duration->i . ' minutes';
			}
		}

		return $ret;
	}
1213166
public function getFormattedTotalBrutSum()
    {
        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->oxorder__oxtotalbrutsum->value, $this->getOrderCurrency());
    }
936569
public function getFormatter()
    {
        $locale = $this->getLocale();
        $currency = $this->getCurrency();
        if ($currency) {
            $locale .= '@currency=' . $currency;
        }
        return NumberFormatter::create($locale, NumberFormatter::CURRENCY);
    }
424428
public function getDtEnd()
    {
        if (!$this->valid()) {
            return;
        }
        $end = clone $this->currentDate;

        return $end->modify('+'.$this->eventDuration.' seconds');
    }
979365
public function get_setting() {
        $seconds = $this->config_read($this->name);
        if (is_null($seconds)) {
            return null;
        }

        return self::parse_seconds($seconds);
    }
1232632
public function getAge()
    {
        if (!$this->hasDateOfBirth()) {
            return 0;
        }

        $currentTimestamp = $GLOBALS['EXEC_TIME'];
        $birthTimestamp = $this->getDateOfBirth();

        $currentYear = (int)strftime('%Y', $currentTimestamp);
        $currentMonth = (int)strftime('%m', $currentTimestamp);
        $currentDay = (int)strftime('%d', $currentTimestamp);
        $birthYear = (int)strftime('%Y', $birthTimestamp);
        $birthMonth = (int)strftime('%m', $birthTimestamp);
        $birthDay = (int)strftime('%d', $birthTimestamp);

        $age = $currentYear - $birthYear;

        if ($currentMonth < $birthMonth) {
            $age--;
        } elseif ($currentMonth === $birthMonth) {
            if ($currentDay < $birthDay) {
                $age--;
            }
        }

        return $age;
    }
750269
public function getTtl() {

        if ( is_null($this->expiration) ) return null;

        if ( $this->expiration === 0 ) return 0;

        $now = new DateTime("now");

        if ( $now > $this->expiration ) return -1;

        return (int) $now->diff($this->expiration)->format("%r%s");

    }
290389
public function getLocale()
	{
		if (!$this->locale) {
            $locale = self::getStaticLocale();
            if (!$locale) {
                $locale = StdLocale::getDefault();
            }

            $this->setLocale($locale);
		}
		
		return $this->locale;
	}
212957
public function getLocalizedShortString()
    {
        //"Mon 15 Aug"
        $date     = $this->getDateStart();
        $out = $date->getLocalized(Date::DATE_FORMAT_DAY_MONTH);
        return $out;
    }
1284843
public function now($interval = 0)
    {
        if ($interval) {
            $add = ' ' . ($interval > 0 ? '+' : '-') . ' INTERVAL ';
            $add .= $interval > 0 ? intval($interval) : intval($interval) * -1;
            $add .= ' SECOND';
        }

        return "now()" . $add;
    }