Utility增加todayYYYYMMDDHHmmss方法
This commit is contained in:
@@ -1505,6 +1505,17 @@ public final class Utility {
|
||||
+ today.getHour() * 100 + today.getMinute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当天20151231235959格式的int值
|
||||
*
|
||||
* @return 20151231235959格式的int值
|
||||
*/
|
||||
public static long todayYYYYMMDDHHmmss() {
|
||||
java.time.LocalDateTime today = java.time.LocalDateTime.now();
|
||||
return today.getYear() * 100_00_00_00_00L + today.getMonthValue() * 100_00_00_00 + today.getDayOfMonth() * 100_00_00
|
||||
+ today.getHour() * 100_00 + today.getMinute() * 100 + today.getSecond();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当天151231235959格式的int值
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user