From: Justin Collins Date: 2006-05-11T05:08:02+09:00 Subject: Re: Thanks Ruby Quiz! Matthew Moss wrote: > On 5/10/06, Charlie Bowman wrote: >> >> >> The Rails Plugin is a direct result of the ruby quiz. I just wanted to >> say thanks to Ruby Quiz and Mathew Ross for his solution. >> >> >> = numbersToWords - convert your integers and floats to english or >> japaneese words,or translate it into american currency >> >> - This plugin was created from a solution to the ruby quiz (english >> numbers) by Matthew D Moss. I modified the code to work as a rails >> plugin and added the to_dollars method. >> - the to_dollars method will work with integers and floats >> - the to_english and to_japaneese methods will only work with integers. >> If you have call these methods on a float, it will be converted to an >> integer before translating. >> >> = Examples >> 123.to_english == one hundred and twenty-three >> I know this is really nit-picky, but the "proper" way to say 123 is "one hundred twenty-three." "And" is only used for decimal points: > money.to_dollars == one hundred and twenty-three dollars and > twenty-three cents would be "one hundred twenty-three dollars and twenty-three cents." (Feels the need to insert pun about this being my 0.02.to_dollars) -Justin