This commit is contained in:
@@ -431,6 +431,20 @@ export default {
|
|||||||
});
|
});
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// "locale:diffhours...",
|
||||||
|
// stopDate.diff(startDate, "hours").toObject().hours
|
||||||
|
// );
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// "locale:diffhours.. ROUNDED.",
|
||||||
|
// window.$gz.util.roundAccurately(
|
||||||
|
// stopDate.diff(startDate, "hours").toObject().hours,
|
||||||
|
// 2
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
|
||||||
return window.$gz.util.roundAccurately(
|
return window.$gz.util.roundAccurately(
|
||||||
stopDate.diff(startDate, "hours").toObject().hours,
|
stopDate.diff(startDate, "hours").toObject().hours,
|
||||||
2
|
2
|
||||||
|
|||||||
@@ -158,31 +158,26 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setToday() {
|
setToday() {
|
||||||
var tmp = window.$gz.DateTime.local()
|
//Was this but in afternoon shows the next day ?!?
|
||||||
.setZone(this.timeZoneName)
|
// const v = window.$gz.locale
|
||||||
.toUTC()
|
// .nowUTC8601String(this.timeZoneName)
|
||||||
.toString();
|
// .split("T")[0];
|
||||||
console.log(tmp);
|
|
||||||
|
|
||||||
// console.log("setToday", {
|
const v = window.$gz.DateTime.local()
|
||||||
// tz: this.timeZoneName,
|
.toString()
|
||||||
// now: window.$gz.locale.nowUTC8601String(this.timeZoneName)
|
|
||||||
// });
|
|
||||||
const v = window.$gz.locale
|
|
||||||
.nowUTC8601String(this.timeZoneName)
|
|
||||||
.split("T")[0];
|
.split("T")[0];
|
||||||
|
|
||||||
//console.log("end result:", v);
|
|
||||||
this.updateDateValue(v);
|
this.updateDateValue(v);
|
||||||
this.dlgdate = false;
|
this.dlgdate = false;
|
||||||
},
|
},
|
||||||
setNow() {
|
setNow() {
|
||||||
// console.log("setNow", {
|
//was this but works the more simpler way copied from set today
|
||||||
// tz: this.timeZoneName,
|
//const v = window.$gz.locale.nowUTC8601String().split("T")[1];
|
||||||
// now: window.$gz.locale.nowUTC8601String(this.timeZoneName)
|
|
||||||
// });
|
//now without the milliseconds
|
||||||
const v = window.$gz.locale.nowUTC8601String().split("T")[1];
|
var nowNoMs = window.$gz.DateTime.local().set({ milliseconds: 0 });
|
||||||
//console.log("end result:", v);
|
const v = nowNoMs.toString().split("T")[1];
|
||||||
|
|
||||||
this.updateTimeValue(v);
|
this.updateTimeValue(v);
|
||||||
this.dlgtime = false;
|
this.dlgtime = false;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -108,9 +108,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setNow() {
|
setNow() {
|
||||||
const v = window.$gz.locale
|
// const v = window.$gz.locale
|
||||||
.nowUTC8601String(this.timeZoneName)
|
// .nowUTC8601String(this.timeZoneName)
|
||||||
.split("T")[1];
|
// .split("T")[1];
|
||||||
|
|
||||||
|
//now without the milliseconds
|
||||||
|
var nowNoMs = window.$gz.DateTime.local().set({ milliseconds: 0 });
|
||||||
|
const v = nowNoMs.toString().split("T")[1];
|
||||||
|
|
||||||
this.updateTimeValue(v);
|
this.updateTimeValue(v);
|
||||||
this.dlgtime = false;
|
this.dlgtime = false;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user