public class TimestampUtil extends Object
| 构造器和说明 |
|---|
TimestampUtil() |
public static final Long SECOND
public static final Long MINUTE
public static final Long HOUR
public static Timestamp fromLong(long time)
public static Timestamp getMonthStart(Timestamp time)
time - 任意时间public static Timestamp getYearStart(Timestamp time)
time - 任意时间public static Integer getDifferenceDay(Timestamp start, Timestamp end)
start - 开始时间end - 结束时间public static Timestamp getTodayStart()
public static Timestamp getTodayEnd()
public static Timestamp getYesterdayStart()
public static Timestamp getYesterdayEnd()
public static Timestamp getTomorrowStart()
public static Timestamp getTomorrowEnd()
public static Integer getDifferenceMonth(Timestamp start, Timestamp end)
start - 开始时间end - 结束时间public static boolean isToday(Timestamp time)
time - 任意时间public static boolean isInRange(Timestamp time, Timestamp start, Timestamp end)
time - 比较时间start - 范围开始时间end - 范围结束时间public static BigDecimal getPercentageRemainingOfMonth(Timestamp time)
time - 任意时间public static Integer getRemainingDaysOfMonth(Timestamp time)
time - 任意时间Copyright © 2020–2021. All rights reserved.