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

@@ -45,11 +45,9 @@ export default {
oldDate: null,
dlgdate: false,
//cache display format stuff
timeZoneName: window.$gz.translation.getBrowserTimeZoneName(),
languageName: window.$gz.translation.getBrowserLanguages(),
defaultLocale: window.$gz.translation
.getBrowserFirstLanguage()
.split("-", 1)[0]
timeZoneName: window.$gz.locale.getBrowserTimeZoneName(),
languageName: window.$gz.locale.getBrowserLanguages(),
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
}),
props: {
label: String,
@@ -86,7 +84,7 @@ export default {
},
computed: {
formatDateTime() {
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
this.value,
this.timeZoneName,
this.languageName,
@@ -94,14 +92,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,
@@ -111,7 +109,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
);
@@ -122,7 +120,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
);
@@ -132,7 +130,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
);
@@ -154,7 +152,7 @@ export default {
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
}
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
DatePortion + "T" + value,
this.timeZoneName
);