Format isk

This commit is contained in:
2023-07-26 17:25:56 +02:00
parent afa4020b31
commit c75f3b6321
2 changed files with 7 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
export const iskFormater = new Intl.NumberFormat("is-IS", {
style: "currency",
currency: "ISK",
const iskFormater = new Intl.NumberFormat("is-IS", {
minimumFractionDigits: 2,
});
export const formatIsk = (value: number | bigint) => iskFormater.format(value) + " ISK";
export const percentFormater = new Intl.NumberFormat("en-US", {
style: "percent",
minimumFractionDigits: 0