no decimal digits unless we actually have one

This commit is contained in:
Florian Stinglmayr 2022-01-26 09:59:57 +01:00
parent 7684438ce2
commit b74b35d8c4

View File

@ -11,7 +11,7 @@ namespace EDJournal {
format.NumberGroupSeparator = ",";
format.NumberDecimalSeparator = ".";
format.NumberGroupSizes = new int[1] { 3 };
format.NumberDecimalDigits = 1;
format.NumberDecimalDigits = 0;
if (amount > 0 && (amount % 1000000000) == 0) {
amount /= 1000000000;
return string.Format("{0}M CR", amount.ToString("N", format));