96gtjeff
asked on
Converting a numeric date to written english
Hey guys, I am writing a program that will accept a date in the MM/DD/YYYY format and return it in written english...EX: March Fifth, Two Thousand Two
I have the program working from 1990 through now, including filtering out erroneous dates...such as the 29th of February on a non-leap year. So far I have been converting everything through a CASE SWITCH statement
EX: CASE 1990: return "nineteen-ninety";
Here's the problem...I want this program to perform this function at least back to 1900...or earlier would be better. I cannot figure out a way to write these year statements without typing out every single year that I want to have available. What would be a good way of going about this?
Thanks in advance,
Jeff
I have the program working from 1990 through now, including filtering out erroneous dates...such as the 29th of February on a non-leap year. So far I have been converting everything through a CASE SWITCH statement
EX: CASE 1990: return "nineteen-ninety";
Here's the problem...I want this program to perform this function at least back to 1900...or earlier would be better. I cannot figure out a way to write these year statements without typing out every single year that I want to have available. What would be a good way of going about this?
Thanks in advance,
Jeff
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much...this oughta do it.
Then use a dual algrithm to come up with the numbers from 20 to 99