Class IntUtil

java.lang.Object
com.acanx.utils.incubator.IntUtil

public class IntUtil extends Object
IntUtil
Since:
0.0.1.10
  • Method Details

    • getCurrentDate

      @Alpha public static Integer getCurrentDate()
      获取当前的8位数字类型的日期 格式:yyyyMMdd
      Returns:
      格式化后的字符串
    • getCurrentTime

      @Alpha public static Integer getCurrentTime()
      获取当前的8位数字类型的日期 格式:yyyyMMdd
      Returns:
      格式化后的字符串
    • toLocalDate

      public static LocalDate toLocalDate(Integer intDate)
      数字类型的日期(如20240901)转换为对应的LocalDate类型
      Parameters:
      intDate - 整形的日期
      Returns:
      LocalDate类型的日期
    • dateTimeToFormattedString

      public static String dateTimeToFormattedString(int date, int time, DateTimeFormatter dateTimeFormatter)
      数字类型的 日期(yyyyMMdd)、时间(HHmmss)转换为格式化的字符串
      Parameters:
      date - 整形的日期
      time - 整形的时间
      dateTimeFormatter - dateTimeFormatter
      Returns:
      格式化后的字符串