Explorar el Código

DateComponent : ajout getTotalMinutes

feature/symfony6.1
Guillaume hace 2 años
padre
commit
be3562b49d
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. +5
    -0
      Component/DateComponent.php

+ 5
- 0
Component/DateComponent.php Ver fichero

@@ -70,4 +70,9 @@ class DateComponent
return $hour ;
}

public function getTotalMinutes(\DateTimeInterface $time): int
{
return (int) $time->format('H') * 60 + (int) $time->format('i');
}

}

Cargando…
Cancelar
Guardar