зеркало из https://github.com/nextcloud/cookbook.git
Show minutes 0-padded in the recipe view
This shows 1 hour as 1:00 instead of 1:0.
This commit is contained in:
Родитель
f20848a8e3
Коммит
6d11f529f0
|
@ -20,7 +20,7 @@
|
|||
|
||||
<?php if(isset($_['prepTime']) && $_['prepTime']) {
|
||||
$prep_interval = new DateInterval($_['prepTime']);
|
||||
$prep_mins = $prep_interval->format('%i');
|
||||
$prep_mins = $prep_interval->format('%I');
|
||||
$prep_hours = $prep_interval->format('%h');
|
||||
?>
|
||||
<p><strong><?php p($l->t('Preparation time')); ?>: </strong><?php echo $prep_hours . ':' . $prep_mins; ?></p>
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
<?php if(isset($_['cookTime']) && $_['cookTime']) {
|
||||
$cook_interval = new DateInterval($_['cookTime']);
|
||||
$cook_mins = $cook_interval->format('%i');
|
||||
$cook_mins = $cook_interval->format('%I');
|
||||
$cook_hours = $cook_interval->format('%h');
|
||||
?>
|
||||
<p><strong><?php p($l->t('Cooking time')); ?>: </strong><?php echo $cook_hours . ':' . $cook_mins; ?></p>
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
<?php if(isset($_['totalTime']) && $_['totalTime']) {
|
||||
$total_interval = new DateInterval($_['totalTime']);
|
||||
$total_mins = $total_interval->format('%i');
|
||||
$total_mins = $total_interval->format('%I');
|
||||
$total_hours = $total_interval->format('%h');
|
||||
?>
|
||||
<p><strong><?php p($l->t('Total time')); ?>: </strong><?php echo $total_hours . ':' . $total_mins; ?></p>
|
||||
|
|
Загрузка…
Ссылка в новой задаче