overview统计

This commit is contained in:
2025-11-14 18:31:39 +08:00
parent 6be3cc6abd
commit 9adc0c2058
24 changed files with 723 additions and 178 deletions

View File

@@ -294,4 +294,29 @@ public class TimeUtils {
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
}
/**
* @description 获取昨天的开始时间
* @return java.util.Date对象
* @author yslg
* @since 2025-11-14
*/
public static Date getStartTimeOfYesterday() {
LocalDate yesterday = LocalDate.now().minusDays(1);
return Date.from(
yesterday.atStartOfDay(ZoneId.systemDefault()).toInstant()
);
}
/**
* @description 获取昨天的结束时间
* @return java.util.Date对象
* @author yslg
* @since 2025-11-14
*/
public static Date getEndTimeOfYesterday() {
LocalDate today = LocalDate.now();
return Date.from(
today.atStartOfDay(ZoneId.systemDefault()).minusNanos(1).toInstant()
);
}
}