Format the timespan to read naturally, e.g.
Saturday 9am to 10.30pm

@return string
550068
public function summarise($start, $end)
	{
		$this->__construct($start, $end);

		// if timespan start falls on the hour, dont display minutes
		if ( $this->start->getMinute() == 0)
		{
			$startFormat = 'l ga';
		}
		else
		{
			$startFormat = 'l g:ia';
		}

		// if timespan start falls on the hour, dont display minutes
		if ( $this->end->getMinute() == 0)
		{
			$endFormat = 'ga';
		}
		else
		{
			$endFormat = 'g:ia';
		}

		// if timespan does not start and end on the same day, display the end day
		if ( $this->start->getDay() != $this->end->getDay() )
		{
			$endFormat = 'l '.$endFormat;
		}

		return $this->start->format($startFormat).' to '. $this->end->format($endFormat);
	}
601904
function getmicrotime() {
		if (function_exists('gettimeofday')) {
			$tod = gettimeofday();
			$sec = $tod['sec'];
			$usec = $tod['usec'];
		} else {
			$sec = time();
			$usec = 0;
		}
		return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec);
	}
252506
public function buildTimeZone()
    {
        if (null !== $this->value) {
            $sign = $this->value < 0 ? '-' : '+';
            $value = intval(abs($this->value) / 60);

            return new DateTimeZone(sprintf(
                '%s%02d:%02d',
                $sign,
                intval($value / 60),
                $value % 60
            ));
        }
    }
748722
public function toTimeString($show_min = false)
    {
        if ($show_min !== true) {
            return sprintf("%02d", $this->getHours()) . 'h';
        } else {
            return sprintf("%02d:%02d", $this->getHours(), $this->getMinutes());
        }
    }
391945
private function newTime()
    {
        $currentHour = date('H');
        $currentMin = date('i');
        $currentSec = date('s');
        $currentMon = date('m');
        $currentDay = date('d');
        $currentYear = date('y');
        return mktime($currentHour, ($currentMin + $_SESSION['session_time']), $currentSec, $currentMon, $currentDay, $currentYear);
    }
842681
public function getAllTimeFormat()
    {
        $aFormats = static::FORMAT_TIME;

        foreach ($aFormats as &$aFormat) {
            $aFormat          = (object) $aFormat;
            $oDateTimeObject  = static::convert(time(), $this->sTimezoneUser);
            $aFormat->example = $oDateTimeObject->format($aFormat->format);
        }

        return $aFormats;
    }
933790
public function getSchedule()
    {
        return implode(' ', [
                $this->getScheduleMonth(),
                $this->getScheduleWeek(),
                $this->getScheduleDayOfMonth(),
                $this->getScheduleDayOfWeek(),
                $this->getScheduleHour(),
                $this->getScheduleMinute()
            ]);
    }
820507
public function scheduled_at_formatted()
    {
        return ucfirst($this->dates->make($this->wrappedObject->scheduled_at)->format($this->incidentDateFormat()));
    }
539746
private function getFormattedTime(SwatDate $time)
    {
        $format = '';

        if ($this->display_parts & self::HOUR) {
            $format .= $this->twelve_hour ? 'h' : 'H';
            if ($this->display_parts & (self::MINUTE | self::SECOND)) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::MINUTE) {
            $format .= 'mm';
            if ($this->display_parts & self::SECOND) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::SECOND) {
            $format .= 'ss';
        }

        if ($this->display_parts & self::HOUR && $this->twelve_hour) {
            $format .= ' a';
        }

        return $time->formatLikeIntl($format);
    }
1261242
public function formatTime($value)
    {
        return \MUtil_Html::create(
                'span',
                ' ',
                // array('class' => 'time'),
                // $this->_timeImg,
                \MUtil_Date::format($value, 'HH:mm ' . \Zend_Date::WEEKDAY_SHORT, $this->_dateStorageFormat)
                );
    }
1211416
private function _generateTimestamp()
    {
        $time = microtime(true);
        $micro = sprintf('%06d', ($time - floor($time)) * 1000000);
        $date = new DateTime(date('Y-m-d H:i:s.' . $micro, $time));
        return $date->format("Y-m-d H:i:s.u");
    }
409876
protected function getTimestamp()/*# : string */
    {
        $num = bcadd(
            bcmul((microtime(true) - strtotime(static::$epoch)), 100000000),
            $this->getSequence() % 10000
        );
        return substr('00' . static::fromBase10($num, self::BASE16), -15);
    }
1225722
protected function render_published_time(): string
    {
        return '<time class="published entry-date" itemprop="datePublished" datetime="'.
           \esc_attr(\get_the_date('Y-m-d\TH:i:sO', $this->post->get())).'">'.
           \get_the_time(\get_option('time_format'), $this->post->get()).
        '</time>';
    }
675388
public static function format($time): string
    {
        $time = round($time * 1000);
        foreach (self::$times as $unit => $value) {
            if ($time >= $value) {
                $time = floor($time / $value * 100.0) / 100.0;
                return $time . ' ' . $unit . ((float)$time === 1.0 ? '' : 's');
            }
        }

        return $time . ' ms';
    }
25492
public function getStarttime()
    {
        $starttime = $this->getExecutedAt();
        if (empty($starttime) || $starttime == '0000-00-00 00:00:00') {
            $starttime = $this->getScheduledAt();
        }
        return $starttime;
    }
754135
public function getCurrentTimestamp()
    {
        Deprecated::method(3.3);

        $timezone = $this->get('general/timezone');
        $now = date_format(new \DateTime($timezone), 'Y-m-d H:i:s');

        return $now;
    }
768167
private function getTimeCase()
    {
        $from = $this->from;
        $to = $this->to;

        // Single hour event
        if (!$to || $to->format('Hi') === $from->format('Hi')) {
            if ($to->format('i') == 0) {
                return 'single_round';
            }

            return 'single';
        }

        $fromTime = [
            'hour'   => $from->format('H'),
            'minute' => $from->format('i'),
        ];

        $toTime = [
            'hour'   => $to->format('H'),
            'minute' => $to->format('i'),
        ];

        $case = null;
        $case = $fromTime['hour'] !== $toTime['hour'] ? 'different_time' : $case;
        $case = $fromTime['minute'] == 0 ? 'different_time_round' : $case;
        $case = $fromTime['minute'] != $toTime['minute'] ? 'different_time' : $case;

        return $case;
    }