How do I determine if a given date is the Nth weekday of the month?

前端 未结 8 1799
无人及你
无人及你 2020-12-03 11:14

Here is what I am trying to do: Given a date, a day of the week, and an integer n, determine whether the date is the nth day of the month.

8条回答
  •  我在风中等你
    2020-12-03 11:23

    You can find a function which returns a date for the nth occurrence of particular week day in any month.

    See http://chiragrdarji.wordpress.com/2010/08/23/find-second-saturday-and-fourth-saturday-of-month/

提交回复
热议问题