• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java calender get weeks in month, start date and enddate

 
G.Sathish kumar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15459
42
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic