Browse Source

DateComponent : ajout getTotalMinutes

feature/symfony6.1
Guillaume 2 years ago
parent
commit
be3562b49d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      Component/DateComponent.php

+ 5
- 0
Component/DateComponent.php View File

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

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

}

Loading…
Cancel
Save