• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting the start date for a week number

 
Dar Var
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to get the start date for a week when given the week number an year.

My calender setting will be

Calendar gregorianCalendar = new GregorianCalendar();
gregorianCalendar.setFirstDayOfWeek(Calendar.MONDAY);
gregorianCalendar.setMinimalDaysInFirstWeek(4);

for example:
if my method is passed in 40/2005 i.e. week 40 in year 2005
The method should pass back 03/10/2005 i.e. 3rd Oct 2005
 
Ritesh Agrawal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dar,

I have added a couple of lines to your code. Lets see if this is what you were looking for.



Cheers!!!

[ October 03, 2005: Message edited by: Ritesh Agrawal ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic