This commit is contained in:
@@ -27,8 +27,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
formattedValue: this.value,
|
||||
currencyName: window.$gz.translation.getCurrencyName(),
|
||||
languageName: window.$gz.translation.getBrowserFirstLanguage()
|
||||
currencyName: window.$gz.locale.getCurrencyName(),
|
||||
languageName: window.$gz.locale.getBrowserFirstLanguage()
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
formattedValue: this.value,
|
||||
languageName: window.$gz.translation.getBrowserFirstLanguage()
|
||||
languageName: window.$gz.locale.getBrowserFirstLanguage()
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -602,8 +602,8 @@ function buildRecords(listData, columndefinitions) {
|
||||
}
|
||||
|
||||
//cache display format stuff
|
||||
var timeZoneName = window.$gz.translation.getBrowserTimeZoneName();
|
||||
var languageName = window.$gz.translation.getBrowserLanguages();
|
||||
var timeZoneName = window.$gz.locale.getBrowserTimeZoneName();
|
||||
var languageName = window.$gz.locale.getBrowserLanguages();
|
||||
var hour12 = window.$gz.store.state.locale.hour12;
|
||||
var currencyName = window.$gz.store.state.locale.currencyName;
|
||||
|
||||
@@ -640,7 +640,7 @@ function buildRecords(listData, columndefinitions) {
|
||||
*/
|
||||
switch (dataType) {
|
||||
case 1: //datetime format to shortdatetime
|
||||
display = window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||
display = window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName,
|
||||
@@ -648,14 +648,14 @@ function buildRecords(listData, columndefinitions) {
|
||||
);
|
||||
break;
|
||||
case 2: //date only
|
||||
display = window.$gz.translation.utcDateToShortDateLocalized(
|
||||
display = window.$gz.locale.utcDateToShortDateLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName
|
||||
);
|
||||
break;
|
||||
case 3: //time only
|
||||
display = window.$gz.translation.utcDateToShortTimeLocalized(
|
||||
display = window.$gz.locale.utcDateToShortTimeLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName,
|
||||
@@ -663,13 +663,10 @@ function buildRecords(listData, columndefinitions) {
|
||||
);
|
||||
break;
|
||||
case 7: //decimal
|
||||
display = window.$gz.translation.decimalLocalized(
|
||||
display,
|
||||
languageName
|
||||
);
|
||||
display = window.$gz.locale.decimalLocalized(display, languageName);
|
||||
break;
|
||||
case 8: //currency
|
||||
display = window.$gz.translation.currencyLocalized(
|
||||
display = window.$gz.locale.currencyLocalized(
|
||||
display,
|
||||
languageName,
|
||||
currencyName
|
||||
|
||||
@@ -49,12 +49,10 @@ export default {
|
||||
oldDate: null,
|
||||
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]
|
||||
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,
|
||||
@@ -91,7 +89,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
formatDateTime() {
|
||||
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||
this.value,
|
||||
this.timeZoneName,
|
||||
this.languageName,
|
||||
@@ -99,7 +97,7 @@ export default {
|
||||
);
|
||||
},
|
||||
formatTime() {
|
||||
return window.$gz.translation.utcDateToShortTimeLocalized(
|
||||
return window.$gz.locale.utcDateToShortTimeLocalized(
|
||||
this.value,
|
||||
this.timeZoneName,
|
||||
this.languageName,
|
||||
@@ -109,7 +107,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
|
||||
);
|
||||
@@ -120,7 +118,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
|
||||
);
|
||||
@@ -130,7 +128,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
|
||||
);
|
||||
@@ -152,7 +150,7 @@ export default {
|
||||
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
||||
}
|
||||
|
||||
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
||||
DatePortion + "T" + value,
|
||||
this.timeZoneName
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user