主页固定显示

This commit is contained in:
2025-10-20 21:30:28 +08:00
parent b1f21fd4f7
commit 68b2e0754c
74 changed files with 4881 additions and 34 deletions

View File

@@ -0,0 +1,19 @@
package com.ttstd.dialer.utils;
import java.util.Calendar;
import java.util.Date;
public class TimeUtils {
// 根据日期取得星期几
public static String getWeek() {
Date date = new Date();
String[] weeks = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int weekIndex = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (weekIndex < 0) {
weekIndex = 0;
}
return weeks[weekIndex];
}
}