This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes getting the start date for a week number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "getting the start date for a week number" Watch "getting the start date for a week number" New topic

getting the start date for a week number

Dar Var
Ranch Hand

Joined: Oct 12, 2004
Posts: 74
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();

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

Joined: Jan 08, 2004
Posts: 74
Hi Dar,

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


[ October 03, 2005: Message edited by: Ritesh Agrawal ]

Ritesh<br /> <br />SCJP 1.4<br />IBM Test 340<br />IBM AIX V4.0 Certified Professional<br /> <br />Right actions for the future are the best apologies for wrong ones in the past.<br />- Tyron Edwards
subject: getting the start date for a week number
It's not a secret anymore!