The idea for this post came from a meeting of the programming managers at work. My programming nemesis, the "I can do everything you do in RPGIV just as well using RPGIII" guy, was bragging that no-one could write a better way of changing a date into words than his old RPG38 program.
"I can do what your program does in just a few lines of code," I explained. He disputed that I could, and the challenge was on.
His old program is passed a date, as a number, and returns:
- Day number of the week, where 1 = Sunday, 2 = Monday, etc.
- Day of the week
- Name of the month
- The date in words, for example "THURSDAY JANUARY 1, 2017"



