类 TimeKit
java.lang.Object
com.iohao.game.common.kit.TimeKit
已过时。
时间工具
- 作者:
- 渔民小镇
- 日期:
- 2023-07-12
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明long已过时。booleanexpire(long milliseconds) booleanexpireLocalDate(long epochDay) 已过时。formatter(long milliseconds) formatter(LocalDateTime localDateTime) longlocalDateToNumber(LocalDate localDate) 已过时。已过时。toInstant(LocalDateTime localDateTime) 已过时。toLocalDateTime(long milliseconds) long已过时。longtoMilli(LocalDateTime localDateTime) 已过时。inttoSecond(LocalDateTime localDateTime)
-
字段详细资料
-
defaultZoneId
已过时。请使用引用无效
ConfigTimeKit#getDefaultZoneId() -
defaultFormatter
已过时。 -
dateFormatterYMD
已过时。
-
-
构造器详细资料
-
TimeKit
public TimeKit()已过时。
-
-
方法详细资料
-
nowLocalDate
已过时。获取 LocalDate,默认每分钟更新一次,可有效减少 LocalDate 对象的创建。- 返回:
- LocalDate
-
currentTimeMillis
已过时。获取 currentTimeMillis 的时间,默认每秒更新一次,如果对时间要求不需要很精准的,可以考虑使用。- 返回:
- System.currentTimeMillis()
-
toSecond
toSecond- 参数:
localDateTime- localDateTime- 返回:
- toSecond
-
toMilli
已过时。toMilli- 参数:
localDateTime- localDateTime- 返回:
- timeMillis
-
toMilli
已过时。toMilli- 参数:
localDate- localDate- 返回:
- toMilli
-
toInstant
已过时。toInstant- 参数:
localDateTime- localDateTime- 返回:
- Instant
-
toLocalDateTime
toLocalDateTime- 参数:
milliseconds- milliseconds- 返回:
- LocalDateTime
-
formatter
formatter- 参数:
localDateTime- localDateTime- 返回:
- fmt
-
formatter
已过时。formatter- 返回:
- fmt
-
formatter
formatter- 参数:
milliseconds- milliseconds- 返回:
- String
-
localDateToNumber
已过时。将 LocalDate 转为 number- 参数:
localDate- localDate- 返回:
- long
-
expireLocalDate
过期检测- 参数:
epochDay- 格式 yyyyMMdd- 返回:
- true 表示日期已经过期
-
expire
过期检测与当前时间做比较,查看是否过期- 参数:
milliseconds- 需要检测的时间- 返回:
- true milliseconds 已经过期
-
com.iohao.game.common.kit.time相关类