类 DateUtil

java.lang.Object
com.budwk.app.base.utils.DateUtil

public class DateUtil extends Object
Created by wizzer on 2016/6/24.
  • 构造器详细资料

    • DateUtil

      public DateUtil()
  • 方法详细资料

    • getDate

      public static String getDate()
      获取当前时间(HH:mm:ss)
      返回:
    • getTime

      public static String getTime()
      获取当前时间(HH:mm:ss)
      返回:
    • getDateTime

      public static String getDateTime()
      获取当前时间(yyyy-MM-dd HH:mm:ss)
      返回:
    • formatDateTime

      public static String formatDateTime(Date date)
      转换日期格式(yyyy-MM-dd HH:mm:ss)
      参数:
      date -
      返回:
    • format

      public static String format(Date date, String f)
      转换日期格式(yyyy-MM-dd HH:mm:ss)
      参数:
      date -
      f -
      返回:
    • getDate

      public static String getDate(long time)
      时间戳日期
      参数:
      time -
      返回:
    • getDate

      public static String getDate(long time, String f)
      时间戳日期
      参数:
      time -
      f -
      返回:
    • getTime

      public static long getTime(String date)
      通过字符串时间获取时间戳 nutzwk5.0改为long
      参数:
      date -
      返回:
    • getTime

      public static long getTime(SimpleDateFormat sdf, String date)
      通过字符串时间获取时间戳 nutzwk5.0改为long
      参数:
      date -
      返回:
    • getDatePoor

      public static String getDatePoor(Date endDate, Date nowDate)
      计算两个时间差
    • formatDate

      public static long formatDate(String data)