1. Die Dauer wird jetzt korrekt berechnet. Man kann vorher eingetragene Von- und Bis-Werte wieder löschen. Es kommt ebenfalls nicht mehr zu seltsamen Dauer-Werten wie 52000.
7 lines
226 B
JavaScript
7 lines
226 B
JavaScript
function parseTimeInputToIntegerArray(timeString) {
|
|
var hoursToMinutes = timeString.split(":");
|
|
var hours = parseInt(hoursToMinutes[0]);
|
|
var minutes = parseInt(hoursToMinutes[1]);
|
|
|
|
return [hours, minutes];
|
|
} |