Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检查一周中的当前日期是否是星期日。我怎样才能找到它?我在警报活动中使用它。请帮我。我想设置一个周日不工作的闹钟。提前致谢。
使用日历类来检查该信息。
Calendar rightNow = Calendar.getInstance(); int day = rightNow.get(Calendar.DAY_OF_WEEK); if(day==Calendar.SUNDAY){ //its sunday }