Add BamBuddy AMS, queue, history and stats to the print farm page
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 28s
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 28s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
f7e3c8fe16
commit
b11538944f
@@ -93,6 +93,17 @@ class Display
|
||||
));
|
||||
}
|
||||
|
||||
/** Format a number of seconds as a short duration such as "2h 1m". */
|
||||
public function duration(int|float|null $seconds): string
|
||||
{
|
||||
if ($seconds === null || $seconds <= 0) {
|
||||
return '—';
|
||||
}
|
||||
$minutes = (int) round($seconds / 60);
|
||||
|
||||
return $minutes >= 60 ? intdiv($minutes, 60).'h '.($minutes % 60).'m' : $minutes.'m';
|
||||
}
|
||||
|
||||
/** Format an API date or date-time as a readable string, dropping the time when it is midnight. */
|
||||
public function dateTime(string|int|null $value): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user