This commit is contained in:
2020-02-06 01:02:21 +00:00
parent 38ec953b25
commit 3e28b06374

View File

@@ -210,10 +210,15 @@ Vue.filter("shorttimeonlylocalized", function vueFilterShortTimeOnlyLocalized(
);
});
//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#Browser_compatibility
TODO: Need to specify currency from list of standard values and add to locale settings rather than using symbol I guess
Vue.filter("currency", function vueFilterCurrency(value) {
if (!value) return "";
return locale.format().currencySymbol + value.toFixed(2);
return value.toLocaleString(window.$gz.locale.getFirstBrowserLanguage(), {
style: "currency",
currency: "EUR"
});
// return locale.format().currencySymbol + value.toFixed(2);
});
Vue.filter("decimal", function vueFilterDecimal(value) {