This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting the start date for a week number

 
Dar Var
Ranch Hand
Posts: 74
  • 0
  • 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
  • 0
  • 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