I'm working on a wicket project, and I'm kinda stumped here on trying to get the components of the date. Thing is, I don't want to use deprecated code, so I decided on using Calendar instead.
For instance I have the following code:
How do I convert it to Calendar so I could just use something like this?
kind regards
JR
For instance I have the following code:
Code:
Date d = (Date) dateModel.getObject(); //generic Date.
...
Calendar cal = Calendar.getInstance();
...
System.out.println(" " + month + " " + day + " " + year);
Code:
year = cal.YEAR; month = cal.MONTH; ...
JR
Comment