Commit 3df6760d authored by 赵啸非's avatar 赵啸非

添加首页统计模块 统计近一周

parent f3f5ec36
......@@ -112,17 +112,29 @@ public class SiteStatTaskImpl implements ITaskExcuteService {
}
public static void main(String[] args) {
int year = DateUtil.date().year();
for (int i = 0; i < 7; i++) {
DateTime beforeDate = DateUtil.offsetDay(new Date(), -i);
int year = beforeDate.year();
int month = beforeDate.month() + 1;
int day = beforeDate.dayOfMonth();
System.out.println(year + "年" + month + "月" + day + "日");
}
/* int year = DateUtil.date().year();
int month = DateUtil.date().month() + 1;
int day = DateUtil.date().dayOfMonth();
// System.out.println(year + "年" + month + "月" + day + "日");
System.out.println(DateUtil.offsetDay(new Date(), -0).toString("yyyy-MM-dd"));
System.out.println(dateTime.toString("yyyy-MM-dd"));*/
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment