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