This commit is contained in:
2021-07-21 15:33:04 +00:00
parent 370707a649
commit 388bc2e103

View File

@@ -178,15 +178,16 @@ export default {
// Turn a duration value into a display
//
durationLocalized(value, hideSeconds) {
if (value == null || value == "00:00:00") {
return "";
}
let theDays = 0;
let theHours = 0;
let theMinutes = 0;
let theSeconds = 0;
let ret = "";
if (value == null) {
return ret;
} else {
let work = value.split(":");
//has days?
if (work[0].includes(".")) {
@@ -209,25 +210,18 @@ export default {
ret += theDays + " " + window.$gz.translation.get("TimeSpanDays") + " ";
}
if (theHours != 0) {
ret +=
theHours + " " + window.$gz.translation.get("TimeSpanHours") + " ";
ret += theHours + " " + window.$gz.translation.get("TimeSpanHours") + " ";
}
if (theMinutes != 0) {
ret +=
theMinutes +
" " +
window.$gz.translation.get("TimeSpanMinutes") +
" ";
theMinutes + " " + window.$gz.translation.get("TimeSpanMinutes") + " ";
}
if (!hideSeconds && theSeconds != 0) {
ret +=
theSeconds +
" " +
window.$gz.translation.get("TimeSpanSeconds") +
" ";
theSeconds + " " + window.$gz.translation.get("TimeSpanSeconds") + " ";
}
return ret;
}
},
///////////////////////////////////////////////
// Convert a utc date to local time zone