The Artima Developer Community
Sponsored Link

Java Answers Forum
Getting the starting date of the week, if the week number is given

1 reply on 1 page. Most recent reply: Aug 23, 2002 2:35 PM by Don Hill

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Java

Posts: 3
Nickname: artima
Registered: May, 2002

Getting the starting date of the week, if the week number is given Posted: Aug 23, 2002 12:03 AM
Reply to this message Reply
Advertisement
Hi All,

Does Java provides the API to get the first date of the starting week, if the week number is mentioned?
If not, then what could be the correct approach to get the starting date for the week mentioned?

Thanks


Don Hill

Posts: 70
Nickname: ssswdon
Registered: Jul, 2002

Re: Getting the starting date of the week, if the week number is given Posted: Aug 23, 2002 2:35 PM
Reply to this message Reply
> Hi All,
>
> Does Java provides the API to get the first date of
> the starting week, if the week number is mentioned?
> If not, then what could be the correct approach to
> get the starting date for the week mentioned?
>
> Thanks

I think you need to do something like this.

Calendar cal = new GregorianCalendar();
cal.set( Calendar.WEEK_OF_YEAR, 35 );
cal.set( Calendar.DAY_OF_WEEK, 0);
System.out.println("date \n" + cal.get(Calendar.MONTH) + "/" + cal.get(Calendar.DAY_OF_MONTH) +
"/" + cal.get(Calendar.YEAR));
HTH

Flat View: This topic has 1 reply on 1 page
Topic: help Previous Topic   Next Topic Topic: button hangs

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use