P
Peter Rank
Hi,
I want to display a String that contains the calendarweek and the
year. So I used the following format:
SimpleDateFormat weekFormat = new SimpleDateFormat("'KW' ww '/'
yyyy");
GregorianCalendar gc = new GregorianCalendar(2007,11,31);
System.out.println(weekFormat.format(gc.getTime()));
The result is: KW 01 / 2007
but what I would expect is: KW 53 / 2007 (KW 1 / 2008 would be okay
anyway)
Okay, ist's not quite difficult to code something to get the right
result, but ist there a solution that just uses the SimpleDateFormat-
Class to get the expected result?
Thanks
Peter
I want to display a String that contains the calendarweek and the
year. So I used the following format:
SimpleDateFormat weekFormat = new SimpleDateFormat("'KW' ww '/'
yyyy");
GregorianCalendar gc = new GregorianCalendar(2007,11,31);
System.out.println(weekFormat.format(gc.getTime()));
The result is: KW 01 / 2007
but what I would expect is: KW 53 / 2007 (KW 1 / 2008 would be okay
anyway)
Okay, ist's not quite difficult to code something to get the right
result, but ist there a solution that just uses the SimpleDateFormat-
Class to get the expected result?
Thanks
Peter