Get Minutes as Minutes (hh:ii)

@param int $minutes

@return string
487713
public function getMinutesAsHours($minutes)
    {
        $hours = floor($minutes / 60);
        $minutes = $minutes - ($hours * 60);

        return sprintf('%s:%s', $hours, str_pad($minutes, 2, '0', STR_PAD_LEFT));
    }
833579
public function getSecondsAsTextExtended($seconds)
    {
        $seconds = floatval($seconds);
        $result = [];

        $steps = [
            'days'    => 86400,
            'hours'   => 3600,
            'minutes' => 60,
            'seconds' => 1,
        ];

        foreach ($steps as $stepName => $stepDivider) {
            $stepCount = floor($seconds / $stepDivider);
            if (0 < $stepCount) {
                $result[] = sprintf('%d %s', $stepCount, $this->getTranslator()->transChoice($stepName, $stepCount));
                $seconds = $seconds - ($stepCount * $stepDivider);
            }
        }

        return implode(' ', $result);
    }
678225
public static function timeToText($time)
    {
        $timeHour   = ceil($time * 60);
        $modMinutes = $timeHour % 60;
        $hour       = floor($time);

        return $hour . ' h ' . $modMinutes . ' m';
    }
1304651
public static function toTimeString($time)
    {
        $times = array(
            'hour'   => 3600000,
            'minute' => 60000,
            'second' => 1000
        );

        $ms = $time;

        foreach ($times as $unit => $value) {
            if ($ms >= $value) {
                $time = floor($ms / $value * 100.0) / 100.0;
                return $time . ' ' . ($time == 1 ? $unit : $unit . 's');
            }
        }
        return $ms . ' ms';
    }
1169282
public function daily($hour = 0, $minute = 0)
    {
        if (is_string($hour)) {
            $parts = explode(':', $hour);
            $hour = $parts[0];
            $minute = isset($parts[1]) ? $parts[1] : '0';
        }

        $c = $this->validateCronSequence($minute, $hour);

        return $this->at("{$c['minute']} {$c['hour']} * * *");
    }
496544
public function online($minutes = null)
    {
        if (!$minutes) {
            return $this->cache->forever('hipsupport', true);
        }

        return $this->cache->put('hipsupport', true, $minutes);
    }
1062685
function getTime(time) {
  var hours = Math.floor(time/3600);
  var minutes = Math.floor(time % 3600/60);
  var seconds = (time % 3600) % 60;

  return hours + 'h ' + minutes + 'min ' + seconds + 's';
}
144355
private function retrieveIntervalFromSeconds($seconds)
    {
        $result = '';
        $remainingTime = (int) $seconds;

        if (empty($remainingTime)) {
            $result .= 'PT0S';
        } else {
            $nbDays = (int) ($remainingTime / 86400);
            $remainingTime %= 86400;
            $nbHours = (int) ($remainingTime / 3600);
            $remainingTime %= 3600;
            $nbMinutes = (int) ($remainingTime / 60);
            $nbSeconds = $remainingTime % 60;
            $result .= 'P'.$nbDays.'DT'.$nbHours.'H'.$nbMinutes.'M'.$nbSeconds.'S';
        }

        return $result;
    }
369491
function secondsToTime(secs) {
  var days = Math.floor(secs / (60 * 60 * 24))
    , divisor_for_hours = secs % (60 * 60 * 24)
    , hours = Math.floor(divisor_for_hours / (60 * 60))
    , divisor_for_minutes = secs % (60 * 60)
    , minutes = Math.floor(divisor_for_minutes / 60)
    , divisor_for_seconds = divisor_for_minutes % 60
    , seconds = Math.ceil(divisor_for_seconds);
  return {"d": days, "h": hours, "m": minutes, "s": seconds};
}
1072953
public function format_time( $seconds ) {
		$times = $this->friendly_times( $seconds );

		return sprintf( "%d:%02d:%02d", $times['hours'], $times['minutes'], $times['seconds'] );
	}
857030
public static function formatTime($micros)
    {
        $seconds = $micros;
        $minutes = (int) floor($seconds / 60);
        if ($minutes >= 1) {
            return sprintf(
                "%1.0f minute%s %0.2f second%s",
                $minutes,
                ($minutes === 1 ? " " : "s "),
                $seconds - floor($seconds / 60) * 60,
                ($seconds % 60 === 1 ? "" : "s")
            );
        } else {
            return sprintf("%0.4f second%s", $seconds, ($seconds % 60 === 1 ? "" : "s"));
        }
    }
943460
public static String secondsToHoursMinutesSeconds(final long secs)
        {
        final double minutesRemaining = (secs / 60) % 60;
        final double hoursRemaining = Math.floor(secs / 60 / 60);
        final double secondsRemaining = secs % 60;
        
        final StringBuilder sb = new StringBuilder();
        if (hoursRemaining > 0.0)
            {
            sb.append((int)hoursRemaining);
            sb.append(" hrs, ");
            }
        if (minutesRemaining > 0.0)
            {
            sb.append((int)minutesRemaining);
            sb.append(" mins, ");
            }
        sb.append((int)secondsRemaining);
        sb.append(" secs");
        return sb.toString();
        }
1054447
public function format(string $format): string
    {
        return CommonTime::inSeconds($this->seconds)->format($format);
    }
631211
public static function time($seconds)
    {
        if ($seconds < 0) {
            return "n/a";
        }

        if ($seconds < 60) {
            return $seconds . " Seconds";
        }

        $minutes = floor($seconds / 60);
        $seconds = $seconds % 60;

        if ($minutes < 60) {
            if ($seconds >= 30) {
                $minutes++;
            }
            return $minutes . " Minutes";
        }

        $hours = floor($minutes / 60);
        $minutes = $minutes % 60;

        if ($hours < 24) {
            if ($minutes >= 30) {
                $hours++;
            }
            return $hours . " Hours";
        }

        $days = floor($hours / 24);
        $hours = $hours % 24;

        if ($hours >= 12) {
            $days++;
        }

        return $days . " Days";
    }
1051261
public static function seconds($seconds, $is_ms = FALSE, $format = "%dD %02d:%02d:%02d")
  {
    if($is_ms) $seconds = $seconds/1000;

    return sprintf($format, $seconds/60/60/24, ($seconds/60/60)%24, ($seconds/60)%60, $seconds%60);
  }
1096238
static public function secondToTime($times)
    {
        $result = '00:00:00';

        if ($times > 0) {
            $hour = floor($times/3600);
            $minute = floor(($times-3600 * $hour)/60);
            $second = floor((($times-3600 * $hour) - 60 * $minute) % 60);
            $result = str_pad($hour, 2, "0", STR_PAD_LEFT).':'.str_pad($minute, 2, "0", STR_PAD_LEFT).':'.str_pad($second, 2, "0", STR_PAD_LEFT);
        }

        return $result;
    }
831109
public static function humanize(
        $seconds,
        array $format = [
            ['microsecond', 'microseconds'],
            ['millisecond', 'milliseconds'],
            ['second', 'seconds'],
            ['minute', 'minutes'],
            ['hour', 'hours'],
            ['day', 'days'],
            ['month', 'months'],
            ['year', 'years'],
        ]
    ): string
    {
        $seconds = $seconds * 1000000;

        $periods = [
            365 * 24 * 60 * 60 * 1000000 => 7,
            30 * 24 * 60 * 60 * 1000000  => 6,
            24 * 60 * 60 * 1000000       => 5,
            60 * 60 * 1000000            => 4,
            60 * 1000000                 => 3,
            1000000                      => 2,
            1000                         => 1,
            1                            => 0,
        ];

        $humanized = '';
        foreach ($periods as $secs => $index) {
            $count = $seconds / $secs;
            if ($count >= 1) {
                $count = (integer)round($count);
                $seconds -= $count * $secs;
                $humanized .= $count . ' ' . ($count > 1 ? $format[$index][1] : $format[$index][0]) . ' ';
            }
        }

        return rtrim($humanized);
    }