File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 2849
    
  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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Number of weeks in a month