Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Number of weeks in a month  RSS feed

 
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: 3015
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
Boost this thread!