Rafay Hasan
Rafay Hasan

Reputation: 115

Retrieve number of Mondays in a particular month

I want to retrieve number of Mondays of a particular month.

Upvotes: 0

Views: 59

Answers (1)

CRD
CRD

Reputation: 53000

You haven't stated what you've tried and why it didn't work - which is the way SO works. Remember for next time.

In finding a solution to your problem ask yourself the following:

  • What is the minimum number of Mondays (or any other day) in a month? How about the maximum?
  • Can you determine the day of the 1st of any month using library/framework functions?
  • How about the number of days in any month?
  • Using the answers to the above could you design and implement the algorithm?

If you get stuck ask a new question, show what you've tried, where it failed, and someone will undoubtedly help you out.

HTH

Upvotes: 1

Related Questions