类 DateUtils

java.lang.Object
net.sohelp.boot.engine.workflow.assist.DateUtils

public class DateUtils extends Object
日期帮助类
从以下版本开始:
1.0
  • 构造器详细资料

    • DateUtils

      public DateUtils()
  • 方法详细资料

    • getCurrentDate

      public static Date getCurrentDate()
      当前时间 Date 类型
      返回:
      Date
    • now

      public static LocalDateTime now()
      当前时间 LocalDateTime 类型
      返回:
      LocalDateTime
    • after

      public static boolean after(Date arg0, Date arg1)
      日期判断
      参数:
      arg0 - 开始时间
      arg1 - 结束时间
      返回:
      true 开始时间大于结束时间 false 开始时间小于结束时间
    • toDate

      public static Date toDate(LocalDateTime localDateTime)
      日期 LocalDateTime 转为 Date
      参数:
      localDateTime - LocalDateTime
      返回:
      Date
    • calculateDateDifference

      public static Long calculateDateDifference(Date startDate, Date endDate)
      计算时间差
      参数:
      startDate - 开始时间
      endDate - 接受时间
      返回:
      时间差
    • parseDelayTime

      public static Date parseDelayTime(String time)
      解析延迟时间格式
      参数:
      time - 自定义触发时间
      返回:
      Date
    • loadDelayTime

      public static Date loadDelayTime(Map<String,Object> extendConfig, String key, boolean checkEmpty)
      从扩展配置中加载指定 key 延迟时间
      参数:
      extendConfig - 扩展配置
      checkEmpty - 检查是否为空