123333
This commit is contained in:
@@ -19,6 +19,10 @@ public class CaiDateUtil {
|
||||
return ChronoUnit.SECONDS.between(after, before);
|
||||
}
|
||||
|
||||
public static long diffDays(LocalDateTime before, LocalDateTime after){
|
||||
return ChronoUnit.DAYS.between(after, before);
|
||||
}
|
||||
|
||||
public static String betweenShowString(LocalDateTime minTime,LocalDateTime maxTime){
|
||||
Duration duration = Duration.between(minTime, maxTime);
|
||||
long seconds = duration.getSeconds();
|
||||
@@ -102,4 +106,8 @@ public class CaiDateUtil {
|
||||
public static String getCurrentTimeStr() {
|
||||
return localDateTimeToString(LocalDateTime.now());
|
||||
}
|
||||
|
||||
public static String formatDate(LocalDate begin) {
|
||||
return begin.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user