Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Number of weeks in a month

 
Brian Agius
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic