• Post Reply Bookmark Topic Watch Topic
  • New Topic

Customizing date

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I want to print date like this in my jsf, Dec. 1st, 2007....and if it is 3rd then Dec. 3rd, 2007. I'm able to get Dec. 1, 2007 but how can I append st, rd, nd etc based on the date??
 
Mark Spritzler
ranger
Sheriff
Posts: 17290
9
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well based on the API here
http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html

There is no option for that. So if you want it you will have to create your own converter to add it in.

And this tutorial is what I find the easiest to understand
http://www.ibm.com/developerworks/java/library/j-jsf3/

Mark
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark! :thumb:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!