开发者

how do I get the dates of even and the odd weeks by using c#

how do I get the dates even a开发者_C百科nd the odd weeks by using c#

must account for the

  • start of month given by user
  • and also accordingly the end of month with resect to the number of days possible in the month


You can use Calendar.GetWeekOfYear to get the week number of the week containing any date. You can get the week number of the first day in the month, and the last day. Then you just need to find all the even/odd numbers between those two week numbers. The test x % 2 == 0 will tell you if x is even.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜