This commit is contained in:
2020-03-06 20:08:50 +00:00
parent 7318a33350
commit 17bf519cb0
79 changed files with 331 additions and 309 deletions

View File

@@ -85,11 +85,13 @@ export default {
dlgdate: false,
dlgtime: false,
//cache display format stuff
timeZoneName: window.$gz.locale.getBrowserTimeZoneName(),
languageName: window.$gz.locale.getBrowserLanguages(),
hour12: window.$gz.locale.getHour12(),
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
// ampmFormat: window.$gz.locale.getHour12() ? "ampm" : "24hr"
timeZoneName: window.$gz.translation.getBrowserTimeZoneName(),
languageName: window.$gz.translation.getBrowserLanguages(),
hour12: window.$gz.translation.getHour12(),
defaultLocale: window.$gz.translation
.getBrowserFirstLanguage()
.split("-", 1)[0]
// ampmFormat: window.$gz.translation.getHour12() ? "ampm" : "24hr"
//:format="ampmFormat"
}),
props: {
@@ -104,7 +106,7 @@ export default {
},
methods: {
lt(ltKey) {
return window.$gz.locale.get(ltKey);
return window.$gz.translation.get(ltKey);
}
},
watch: {
@@ -127,7 +129,7 @@ export default {
},
computed: {
formatDateTime() {
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
this.value,
this.timeZoneName,
this.languageName,
@@ -135,14 +137,14 @@ export default {
);
},
formatDate() {
return window.$gz.locale.utcDateToShortDateLocalized(
return window.$gz.translation.utcDateToShortDateLocalized(
this.value,
this.timeZoneName,
this.languageName
);
},
formatTime() {
return window.$gz.locale.utcDateToShortTimeLocalized(
return window.$gz.translation.utcDateToShortTimeLocalized(
this.value,
this.timeZoneName,
this.languageName,
@@ -152,7 +154,7 @@ export default {
dateOnly: {
get() {
//return date only portion converted to local working time zone: YYYY-MM-DD
return window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
return window.$gz.translation.utcDateStringToLocal8601DateOnlyString(
this.value,
this.timeZoneName
);
@@ -163,7 +165,7 @@ export default {
if (!TimePortion) {
TimePortion = "00:00:00";
}
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
value + "T" + TimePortion,
this.timeZoneName
);
@@ -173,7 +175,7 @@ export default {
//expects just the hours minutes seconds portion: 18:18:49
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
get() {
return window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
return window.$gz.translation.utcDateStringToLocal8601TimeOnlyString(
this.value,
this.timeZoneName
);
@@ -195,7 +197,7 @@ export default {
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
}
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
DatePortion + "T" + value,
this.timeZoneName
);