This commit is contained in:
@@ -1063,6 +1063,28 @@ public final class Utility {
|
|||||||
return today.getYear() % 100 * 10000 + today.getMonthValue() * 100 + today.getDayOfMonth();
|
return today.getYear() % 100 * 10000 + today.getMonthValue() * 100 + today.getDayOfMonth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当天1512312359格式的int值
|
||||||
|
*
|
||||||
|
* @return 1512312359格式的int值
|
||||||
|
*/
|
||||||
|
public static int todayYYMMDDHHmm() {
|
||||||
|
java.time.LocalDateTime today = java.time.LocalDateTime.now();
|
||||||
|
return today.getYear() % 100 * 100_00_00_00 + today.getMonthValue() * 100_00_00 + today.getDayOfMonth() * 100_00
|
||||||
|
+ today.getHour() * 100 + today.getMinute();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当天151231235959格式的int值
|
||||||
|
*
|
||||||
|
* @return 151231235959格式的int值
|
||||||
|
*/
|
||||||
|
public static long todayYYMMDDHHmmss() {
|
||||||
|
java.time.LocalDateTime today = java.time.LocalDateTime.now();
|
||||||
|
return today.getYear() % 100 * 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();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取昨天20151230格式的int值
|
* 获取昨天20151230格式的int值
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user