public class LocalDateUtils extends Object
| Constructor and Description |
|---|
LocalDateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
betweenSecond(String startTime,
String endTime)
计算两个日期差
|
static int |
betweenTimeSecond(String startTime,
String endTime)
计算两个时间差
|
static String |
getCurrentDate()
获取当前时间精确到天
|
static int |
getCurrentDayByMonth()
获取当前月份中的日期
|
static int |
getCurrentDayByWeek()
获取本周内的时间,即星期几
|
static int |
getCurrentMonths()
获取当前月份
|
static String |
getCurrentTimeExactSec()
获取精确到秒的当前时间
|
static int |
getCurrentYear()
获取当前年
|
static int |
parseSecondLocalDateByTime(String time)
获取时间对应的秒
|
public static String getCurrentDate()
public static int getCurrentYear()
public static int getCurrentMonths()
public static int getCurrentDayByMonth()
public static int getCurrentDayByWeek()
public static String getCurrentTimeExactSec()
public static int betweenSecond(String startTime, String endTime)
startTime - 开始时间 yyyy-MM-dd HH:mm:ssendTime - 结束时间 yyyy-MM-dd HH:mm:sspublic static int betweenTimeSecond(String startTime, String endTime)
startTime - 开始时间 HH:mm:ssendTime - 结束时间 HH:mm:sspublic static int parseSecondLocalDateByTime(String time)
time - 要解析的时间 格式为: HH:mm:ssCopyright © 2021. All rights reserved.