version:2.0.6

bugfixes:修复闹钟修改默认值,联系人为空时不显示占用,屏幕旋转会错乱,整点报时会息屏亮屏多次播报
update:主页不显示地址,微信拨号优化,优化离线联系人
This commit is contained in:
2025-02-08 17:57:38 +08:00
parent 8eb83634d0
commit 17a9c60979
267 changed files with 1213 additions and 1632 deletions

View File

@@ -12,18 +12,30 @@ public class DayUtils {
return hour >= 16 && minute >= 30;
}
private static final String[] WEEKS = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
/**
* @return 根据日期取得星期几
*/
public static String getWeek() {
Date date = new Date();
String[] weeks = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
public static String getWeek(Date date) {
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int weekIndex = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (weekIndex < 0) {
weekIndex = 0;
}
return weeks[weekIndex];
return WEEKS[weekIndex];
}
public static String getWeek() {
Date date = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int weekIndex = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (weekIndex < 0) {
weekIndex = 0;
}
return WEEKS[weekIndex];
}
}