knadh / dns.toys

A DNS server that offers useful utilities and services over the DNS protocol. Weather, world time, unit conversion etc.
https://www.dns.toys
MIT License
2.5k stars 137 forks source link

added float support in num2words #46

Closed MrMadFox closed 2 years ago

MrMadFox commented 2 years ago

Adds support for float values

❯ dig 0.1.words @localhost -p 5354

;; QUESTION SECTION:
;0.1.words.                     IN      A

;; ANSWER SECTION:
0.1.                    1       IN      TXT     "0.1 = zero Point one"
153.100.words  -> one hundred fifty three Point one
153.000.words -> one hundred fifty three Point zero
153.0001.words -> one hundred fifty three Point zero zero zero one

closes #45

MrMadFox commented 2 years ago

one issue is still there in ans section where it shows number and corresponding string, the number when input is 153.000 is showed as 153 (correct should be 153.0)

current: 153.000. 1 IN TXT "153 = one hundred fifty three Point zero" expected: 153.000. 1 IN TXT "153.0 = one hundred fifty three Point zero"