1 | <?php |
||
7 | trait DiffTrait |
||
8 | { |
||
9 | private function diffInSeconds(string $stateCheckMethod, string $nextDateMethod, string $skipDateMethod, DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
32 | |||
33 | /** |
||
34 | * Return the amount of open time (number of seconds as a floating number) between 2 dates/times. |
||
35 | * |
||
36 | * @param DateTimeInterface $startDate |
||
37 | * @param DateTimeInterface $endDate |
||
38 | * |
||
39 | * @return float |
||
40 | */ |
||
41 | public function diffInOpenSeconds(DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
45 | |||
46 | /** |
||
47 | * Return the amount of open time (number of minutes as a floating number) between 2 dates/times. |
||
48 | * |
||
49 | * @param DateTimeInterface $startDate |
||
50 | * @param DateTimeInterface $endDate |
||
51 | * |
||
52 | * @return float |
||
53 | */ |
||
54 | public function diffInOpenMinutes(DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
58 | |||
59 | /** |
||
60 | * Return the amount of open time (number of hours as a floating number) between 2 dates/times. |
||
61 | * |
||
62 | * @param DateTimeInterface $startDate |
||
63 | * @param DateTimeInterface $endDate |
||
64 | * |
||
65 | * @return float |
||
66 | */ |
||
67 | public function diffInOpenHours(DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
71 | |||
72 | /** |
||
73 | * Return the amount of closed time (number of seconds as a floating number) between 2 dates/times. |
||
74 | * |
||
75 | * @param DateTimeInterface $startDate |
||
76 | * @param DateTimeInterface $endDate |
||
77 | * |
||
78 | * @return float |
||
79 | */ |
||
80 | public function diffInClosedSeconds(DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
84 | |||
85 | /** |
||
86 | * Return the amount of closed time (number of minutes as a floating number) between 2 dates/times. |
||
87 | * |
||
88 | * @param DateTimeInterface $startDate |
||
89 | * @param DateTimeInterface $endDate |
||
90 | * |
||
91 | * @return float |
||
92 | */ |
||
93 | public function diffInClosedMinutes(DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
97 | |||
98 | /** |
||
99 | * Return the amount of closed time (number of hours as a floating number) between 2 dates/times. |
||
100 | * |
||
101 | * @param DateTimeInterface $startDate |
||
102 | * @param DateTimeInterface $endDate |
||
103 | * |
||
104 | * @return float |
||
105 | */ |
||
106 | public function diffInClosedHours(DateTimeInterface $startDate, DateTimeInterface $endDate): float |
||
110 | } |
||
111 |