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