It's not a secret anymore!*
The moose likes Java in General and the fly likes Java calender get weeks in month, start date and enddate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java calender get weeks in month, start date and enddate" Watch "Java calender get weeks in month, start date and enddate" New topic
Author

Java calender get weeks in month, start date and enddate

G.Sathish kumar
Ranch Hand

Joined: Jul 27, 2009
Posts: 84
Hi

I have a requirement to get all weeks in month and start, end date of each week

my only input is year

input - year -2009
------

output i required
-------------------
example
----------
month - january

week1 start date end date
week2 start date end date
week3 start date end date
week4 start date end date
week5 start date end date

month - feburary

week1 start date end date
week2 start date end date
week3 start date end date
week4 start date end date

please help me to write the logic?

asap i need to finish this so please help me?


Thanks
Sathish kumar
SCJP, SCWCD
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Show us what you tried yourself (JavaRanch is not a code mill). If you get stuck somewhere, explain exactly what the problem is.

If you don't know how to start on this: Have a look at the API documentation of class java.util.Calendar if there are useful methods that you can use for this.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
Don't get me started about those stupid light bulbs.
 
subject: Java calender get weeks in month, start date and enddate
 
Similar Threads
Object Arrays
regarding date in javascript
Help with Methods please
having problem with a stored procedure used called by a DAO
how do I get the next line in the file and tokenize it