|
@@ -357,6 +357,18 @@ public class DateUtils extends PropertyEditorSupport {
|
|
|
return longDate;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public static Integer getHour(long millis) {
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
|
|
|
+ Date d1 = new Date(millis);
|
|
|
+ String d2 = simpleDateFormat.format(d1);
|
|
|
+ Integer hour = Integer.valueOf(d2);
|
|
|
+ return hour;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static String temp13ToDate(long millis) {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date d1 = new Date(millis);
|
|
@@ -1146,11 +1158,9 @@ public class DateUtils extends PropertyEditorSupport {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- Map<String, String> monthStartAndEnd = DateUtils.getMonthStartAndEnd();
|
|
|
- String firstDay = monthStartAndEnd.get("firstDay");
|
|
|
- String lastDay = monthStartAndEnd.get("lastDay");
|
|
|
- List<String> days = DateUtils.getDays(firstDay, lastDay);
|
|
|
- System.err.println(days);
|
|
|
+ Integer hour = getHour(1698979253012L);
|
|
|
+ System.err.println(hour);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public static String getNowDate(String format) {
|