|
|
|
|
@ -67,13 +67,12 @@ internal class TimePickerBuilder {
|
|
|
|
|
end = HourMinute(picker2.hour, picker2.minute)
|
|
|
|
|
if (missionEnd != null && end > missionEnd) {
|
|
|
|
|
activity.showWarningToast("Ende muss im Einsatz-Zeitraum liegen")
|
|
|
|
|
} else if (start >= end) {
|
|
|
|
|
} else if (start == end) {
|
|
|
|
|
activity.showWarningToast("Ungültige Arbeitszeit erkannt")
|
|
|
|
|
} else {
|
|
|
|
|
val time = "$start - $end"
|
|
|
|
|
val duration = ((end.millis - start.millis).toFloat() / 3600000f)
|
|
|
|
|
val floatFormat = DecimalFormat("#.#", DecimalFormatSymbols(Locale.ENGLISH))
|
|
|
|
|
val roundedDuration = floatFormat.format(duration)
|
|
|
|
|
val roundedDuration = floatFormat.format(start.hoursUntil(end))
|
|
|
|
|
action(time, roundedDuration.toFloat())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|