diff --git a/english.d b/english.d index e79225a..2523ce7 100644 --- a/english.d +++ b/english.d @@ -49,34 +49,34 @@ string numberToEnglish(long number) { if(number) word ~= "-"; } - } else if(number < 1000) { + } else if(number < 1_000) { auto hundreds = number / 100; word ~= onesPlaceWords[cast(int) hundreds] ~ " hundred"; number = number % 100; if(number) word ~= " and "; - } else if(number < 1000000) { - auto thousands = number / 1000; + } else if(number < 1_000_000) { + auto thousands = number / 1_000; word ~= numberToEnglish(thousands) ~ " thousand"; - number = number % 1000; + number = number % 1_000; if(number) word ~= ", "; } else if(number < 1_000_000_000) { - auto millions = number / 1000000; + auto millions = number / 1_000_000; word ~= numberToEnglish(millions) ~ " million"; - number = number % 1000000; + number = number % 1_000_000; if(number) word ~= ", "; } else if(number < 1_000_000_000_000) { - auto n = number / 1000000000; + auto n = number / 1_000_000_000; word ~= numberToEnglish(n) ~ " billion"; - number = number % 1000000000; + number = number % 1_000_000_000; if(number) word ~= ", "; } else if(number < 1_000_000_000_000_000) { - auto n = number / 1000000000000; + auto n = number / 1_000_000_000_000; word ~= numberToEnglish(n) ~ " trillion"; - number = number % 1000000000000; + number = number % 1_000_000_000_000; if(number) word ~= ", "; } else {