Converting a numeric date to written english
Posted on 2002-03-22
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,