@@ 966-975 (lines=10) @@ | ||
963 | * @param float $days |
|
964 | * @return float |
|
965 | */ |
|
966 | private function daysToHours($days) |
|
967 | { |
|
968 | if (0 == $this->period_nbdays) |
|
969 | { |
|
970 | return 0; |
|
971 | } |
|
972 | ||
973 | $ratio = $this->period_nbhours / $this->period_nbdays; |
|
974 | return round(($ratio * $days), 2); |
|
975 | } |
|
976 | ||
977 | /** |
|
978 | * Convert hours to days |
|
@@ 982-991 (lines=10) @@ | ||
979 | * @param float $hours |
|
980 | * @return float |
|
981 | */ |
|
982 | private function hoursToDays($hours) |
|
983 | { |
|
984 | if (0 == $this->period_nbhours) |
|
985 | { |
|
986 | return 0; |
|
987 | } |
|
988 | ||
989 | $ratio = $this->period_nbdays / $this->period_nbhours; |
|
990 | return round(($ratio * $hours), 2); |
|
991 | } |
|
992 | ||
993 | /** |
|
994 | * |