| Author |
GregorianCalendar object
|
Eric Sexton
Ranch Hand
Joined: Sep 12, 2003
Posts: 133
|
|
If I have a GregorianCalendar object, and a method to get the date: Now I want to display a String representation of the name of the month. So if I got back a "0", then I want to display 'January'. Obviously, I don't want a huge "if if if" statement. Thanks in advance!
|
 |
Sainudheen Mydeen
Ranch Hand
Joined: Aug 18, 2003
Posts: 218
|
|
How about this ----------------- Sainudheen
|
 |
Mani Ram
Ranch Hand
Joined: Mar 11, 2002
Posts: 1140
|
|
I don't know whether any build-in methods / variable are available to do this, but in case if there aren't any, you can try this way.
|
Mani
Quaerendo Invenietis
|
 |
Eric Sexton
Ranch Hand
Joined: Sep 12, 2003
Posts: 133
|
|
|
Yeah. That will work for me. Thanks.
|
 |
Jason Menard
Sheriff
Joined: Nov 09, 2000
Posts: 6450
|
|
Aside from the (in this case preferable) method of using an array as shown above, here's another way that will work, using java.text.SimpleDateFormat: [ September 30, 2003: Message edited by: Jason Menard ]
|
Jason's Blog
|
 |
 |
|
|
subject: GregorianCalendar object
|
|
|