Link to home
Start Free TrialLog in
Avatar of neokeet
neokeet

asked on

java calendar

using the java.util.* package, I was trying to get all the days/date in the current week.
Some thing like:

Monday        April 11
Tuesday       April 12
Wednesday  April 13
Thrusday     April 14
Friday          April 15
Saturday      April 16
Sunday        April 17

And then the next week (if I have a next button) (7 days at a time)
Can somebody please help?

Thanks
keet
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you need the dates in the format you listed, use a date formatter like this:

DateFormat formatter = new SimpleDateFormat("EEEE MMMM dd");
System.out.println(formatter.format(cal.getTime()));

Dorothy
:-)