aspose file tools*
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 Java 8 in Action this week in the Java 8 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
I agree. Here's the link:
subject: getting the start date for a week number
Similar Threads
One more GregorianCalendar question
daysOfWeek function implementation
Method Chaining question
48 hours rule, pls recomment
GregorianDate and week_number