check if date() is monday? java

后端 未结 4 488
别跟我提以往
别跟我提以往 2021-02-08 03:34

Is there a way to check if a java Date object is Monday? I see you can with a Calendar object, but date? I\'m also using US-eastern date and time if th

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 04:11

    You should use Calendar object for these checks. Date has weak timezones support. In one timezone this Date can be Monday, and in another timezone it is still Sunday.

提交回复
热议问题