What would be a good implementation to get all Monday and Thursday dates Between a given date range (DateX and DateY) in JAVA

后端 未结 3 691
执笔经年
执笔经年 2021-01-21 09:28

I want to get some days between a given range of dates. What would be an optimal solution for this? For example, I want to get all Monday, Wednesday and Thursday dates from toda

3条回答
  •  不知归路
    2021-01-21 09:49

    Calculate the number of weeks between x and y, and take x's weekday into account.

提交回复
热议问题