公告板
版本库
filestore
活动
搜索
登录
main
/
server-utils
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
TDMQ工具集成
admin
2022-03-25
17055fd8d36504b79a5def28f5d4b4740faf012d
[server-utils.git]
/
src
/
main
/
java
/
org
/
yeshi
/
utils
/
statistic
/
StatisticTimeSpan.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.yeshi.utils.statistic;
/**
* @author hxh
* @title: StatisticSpan
* @description: 统计的时间粒度
* @date 2021/11/18 18:21
*/
public enum StatisticTimeSpan {
minute("%Y-%m-%d %H %i", "yyyy-MM-dd HH mm"), hour("%Y-%m-%d %H", "yyyy-MM-dd HH"), day("%Y-%m-%d", "yyyy-MM-dd"), month("%Y-%m", "yyyy-MM"), year("%Y", "yyyy");
private String sqlTimeFormat;
private String localTimeFormat;
private StatisticTimeSpan(String sqlTimeFormat, String localTimeFormat) {
this.sqlTimeFormat = sqlTimeFormat;
this.localTimeFormat = localTimeFormat;
}
public String getSqlTimeFormat() {
return sqlTimeFormat;
}
public String getLocalTimeFormat() {
return localTimeFormat;
}
}