java - How to format the date into words -


I "java.util.Date" for "October 26" for October "lower ninety three" -10-1993.

You have to date (day, month, year) ), And just change each gradient.

For the day, you will need the number in the words converter. You get a general general or an alternative form Can do it Because your numerical limit is limited, you can write a simple one which only works for the day limit.

For the month, just map it to the name of the month. It should be straightforward.

For the year, you have to be more specific about the need. What is 2010 "twenty ten"? What about the 2009 ? In the same case, for y = 19xx , 18xx , etc., you can enter y% 100 and y / 100

The reason for this is that when y = 1234 , y / 100 = 12 and y% 100 = 34 . In this context, the / integer division is there, and % is the remaining operator to ensure all special cases, eg When y% 100 == 0 , for example 1800 should be eighteen hundred , 1907 (perhaps ) nineteen o seven , etc.

Related Questions


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -