This commit is contained in:
@@ -174,6 +174,38 @@ export default {
|
||||
hour12: hour12
|
||||
});
|
||||
},
|
||||
///////////////////////////////////////////
|
||||
// Turn a duration value into a display
|
||||
//
|
||||
durationLocalized(value) {
|
||||
let theDays = 0;
|
||||
let theHours = 0;
|
||||
let theMinutes = 0;
|
||||
let theSeconds = 0;
|
||||
|
||||
if (value == null) {
|
||||
return "";
|
||||
} else {
|
||||
let work = vm.value.split(":");
|
||||
//has days?
|
||||
if (work[0].includes(".")) {
|
||||
let dh = work[0].split(".");
|
||||
theDays = Number(dh[0]);
|
||||
theHours = Number(dh[1]);
|
||||
} else {
|
||||
theHours = Number(work[0]);
|
||||
}
|
||||
theMinutes = Number(work[1]);
|
||||
//has milliseconds? (ignore them)
|
||||
if (work[2].includes(".")) {
|
||||
let dh = work[2].split(".");
|
||||
theSeconds = Number(dh[0]);
|
||||
} else {
|
||||
theSeconds = Number(work[2]);
|
||||
}
|
||||
}
|
||||
todo: finish this then move on to the UI part and jam this in
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// Convert a utc date to local time zone
|
||||
// and return time portion only in iso 8601
|
||||
|
||||
Reference in New Issue
Block a user