This commit is contained in:
2020-03-06 20:41:05 +00:00
parent 1d874d8d1f
commit 12ff2b6e41
13 changed files with 290 additions and 293 deletions

View File

@@ -85,14 +85,10 @@ export default {
dlgdate: false,
dlgtime: false,
//cache display format stuff
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"
timeZoneName: window.$gz.locale.getBrowserTimeZoneName(),
languageName: window.$gz.locale.getBrowserLanguages(),
hour12: window.$gz.locale.getHour12(),
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
}),
props: {
label: String,
@@ -129,7 +125,7 @@ export default {
},
computed: {
formatDateTime() {
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
this.value,
this.timeZoneName,
this.languageName,
@@ -137,14 +133,14 @@ export default {
);
},
formatDate() {
return window.$gz.translation.utcDateToShortDateLocalized(
return window.$gz.locale.utcDateToShortDateLocalized(
this.value,
this.timeZoneName,
this.languageName
);
},
formatTime() {
return window.$gz.translation.utcDateToShortTimeLocalized(
return window.$gz.locale.utcDateToShortTimeLocalized(
this.value,
this.timeZoneName,
this.languageName,
@@ -154,7 +150,7 @@ export default {
dateOnly: {
get() {
//return date only portion converted to local working time zone: YYYY-MM-DD
return window.$gz.translation.utcDateStringToLocal8601DateOnlyString(
return window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
this.value,
this.timeZoneName
);
@@ -165,7 +161,7 @@ export default {
if (!TimePortion) {
TimePortion = "00:00:00";
}
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
value + "T" + TimePortion,
this.timeZoneName
);
@@ -175,7 +171,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.translation.utcDateStringToLocal8601TimeOnlyString(
return window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
this.value,
this.timeZoneName
);
@@ -197,7 +193,7 @@ export default {
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
}
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
DatePortion + "T" + value,
this.timeZoneName
);