瀏覽代碼

DateComponent : ajout getTotalMinutes

feature/symfony6.1
Guillaume 2 年之前
父節點
當前提交
be3562b49d
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      Component/DateComponent.php

+ 5
- 0
Component/DateComponent.php 查看文件

@@ -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…
取消
儲存