PHP Classes

Does not support decimal digits

Recommend this page to a friend!

      In words  >  All threads  >  Does not support decimal digits  >  (Un) Subscribe thread alerts  
Subject:Does not support decimal digits
Summary:Package rating comment
Messages:5
Author:Ilyas Kazi
Date:2010-08-12 03:00:07
Update:2010-08-16 04:13:19
 

  1. Does not support decimal digits   Reply   Report abuse  
Picture of Ilyas Kazi Ilyas Kazi - 2010-08-12 03:00:08
The biggest drawback of this class in its first stage is... it does not support decimal digits. Anything after decimal point it skips to convert.

The author should add this feature to this class as it is essential where this class will used especially for accounts in invoices, receipts and much more where they need to spell their amount in words.

HTH
Ilyas

  2. Re: Does not support decimal digits   Reply   Report abuse  
Picture of Ronald Lukwago Ronald Lukwago - 2010-08-12 09:18:09 - In reply to message 1 from Ilyas Kazi
Hi Kazi,

I will consider that very soon.
Thx.

  3. Re: Does not support decimal digits   Reply   Report abuse  
Picture of Ilyas Kazi Ilyas Kazi - 2010-08-13 03:18:35 - In reply to message 2 from Ronald Lukwago
Thanks for that consideration and I can see your updates for the same.

But it is incorrect. For example take number 0.28
It will output: point Two Eight

Whereas the correct format is: point Twenty Eight
Likewise...
0.05 -> point five
0.258 -> point two hundred fifty eight
...and so on.

One more thing... instead of hard-coding 'point' string give the option to provide by the user or else use the default available in class.

  4. Re: Does not support decimal digits   Reply   Report abuse  
Picture of Ronald Lukwago Ronald Lukwago - 2010-08-15 20:56:54 - In reply to message 3 from Ilyas Kazi
My friend,

This side thats how we read the decimal digits in English
for your examples, we read it as follows;

0.05 -> point zero five
0.258 -> point two five eight

  5. Re: Does not support decimal digits   Reply   Report abuse  
Picture of Ilyas Kazi Ilyas Kazi - 2010-08-16 04:13:19 - In reply to message 4 from Ronald Lukwago
Thank you for correcting me.

Perhaps I was actually looking for one which can spell in Indian English actually. Doesn't matter, your class suffice the needs what actually it has to be.

And I am impressed the way you have supported up to Quadrillion figure. Keep it going...