This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Number of weeks in a month Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Number of weeks in a month" Watch "Number of weeks in a month" New topic
Author

Number of weeks in a month

Brian Agius
Greenhorn

Joined: Oct 30, 2002
Posts: 9
I need to know the number of weeks in a month. It seems that the best class to use is the calendar class. Is there anything else i shoudl consider ?


Regards<br /> <br />BA
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2854
    
  11

The number of full weeks in a month is four. Do you mean the number of a particular days, like Mondays? For that, I think the GregorianCalendar class would do the trick, with a bit of code on your part of course.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Number of weeks in a month