类 DateUtils


  • public class DateUtils
    extends java.lang.Object
    作者:
    BiJi'an
    Description:
    Date:
    2022-01-01 01:23
    • 构造器概要

      构造器 
      构造器 说明
      DateUtils()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.lang.String format​(long timestamp)  
      static java.lang.String format​(java.time.LocalDateTime localDateTime)  
      static java.lang.String format​(java.time.LocalDateTime localDateTime, DateFormat format)  
      static java.lang.String formatNow()  
      static java.lang.String formatNowWithDate()  
      static java.lang.String formatWithDate​(java.time.LocalDateTime localDateTime)  
      static java.time.LocalDateTime parse​(java.lang.String date)  
      static java.time.LocalDateTime parse​(java.lang.String date, DateFormat format)  
      static java.time.LocalDateTime parseWithDate​(java.lang.String date)  
      static java.util.Date toDate​(java.time.LocalDateTime localDateTime)  
      static java.util.Date toDate​(java.time.LocalDateTime localDateTime, java.time.ZoneOffset zoneOffset)  
      static java.time.LocalDateTime toLocalDateTime​(long date)  
      static java.time.LocalDateTime toLocalDateTime​(long date, java.time.ZoneOffset zoneOffset)  
      static java.time.LocalDateTime toLocalDateTime​(java.util.Date date)  
      static java.time.LocalDateTime toLocalDateTime​(java.util.Date date, java.time.ZoneOffset zoneOffset)  
      static long toMilli​(java.time.LocalDateTime localDateTime)  
      static long toMilli​(java.time.LocalDateTime localDateTime, java.time.ZoneOffset zoneOffset)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • DateUtils

        public DateUtils()
    • 方法详细资料

      • format

        public static java.lang.String format​(java.time.LocalDateTime localDateTime,
                                              DateFormat format)
        参数:
        localDateTime - localDateTime
        format - format
        返回:
        java.lang.String
        Description:
        Date:
        2022-11-21 11:21
        Title:
        format
      • format

        public static java.lang.String format​(java.time.LocalDateTime localDateTime)
        参数:
        localDateTime - localDateTime
        返回:
        java.lang.String
        Description:
        Date:
        2022-11-21 11:21
        Title:
        format
      • format

        public static java.lang.String format​(long timestamp)
        参数:
        timestamp - timestamp
        返回:
        java.lang.String
        Description:
        Date:
        2022-12-13 14:50
        Title:
        format
      • formatNow

        public static java.lang.String formatNow()
        返回:
        java.lang.String
        Description:
        Date:
        2022-11-21 11:20
        Title:
        format
      • formatWithDate

        public static java.lang.String formatWithDate​(java.time.LocalDateTime localDateTime)
        参数:
        localDateTime - localDateTime
        返回:
        java.lang.String
        Description:
        Date:
        2022-11-21 11:22
        Title:
        formatDate
      • formatNowWithDate

        public static java.lang.String formatNowWithDate()
        返回:
        java.lang.String
        Description:
        Date:
        2022-11-21 11:22
        Title:
        formatDate
      • parse

        public static java.time.LocalDateTime parse​(java.lang.String date,
                                                    DateFormat format)
        参数:
        date - date
        format - format
        返回:
        java.time.LocalDateTime
        Description:
        Date:
        2022-11-21 11:32
        Title:
        parse
      • parse

        public static java.time.LocalDateTime parse​(java.lang.String date)
        参数:
        date - date
        返回:
        java.time.LocalDateTime
        Description:
        Date:
        2022-11-21 11:32
        Title:
        parse
      • parseWithDate

        public static java.time.LocalDateTime parseWithDate​(java.lang.String date)
        参数:
        date - date
        返回:
        java.time.LocalDateTime
        Description:
        Date:
        2022-11-21 11:33
        Title:
        parseDate, parseDate
      • toMilli

        public static long toMilli​(java.time.LocalDateTime localDateTime,
                                   java.time.ZoneOffset zoneOffset)
      • toMilli

        public static long toMilli​(java.time.LocalDateTime localDateTime)
      • toLocalDateTime

        public static java.time.LocalDateTime toLocalDateTime​(long date,
                                                              java.time.ZoneOffset zoneOffset)
      • toLocalDateTime

        public static java.time.LocalDateTime toLocalDateTime​(long date)
      • toLocalDateTime

        public static java.time.LocalDateTime toLocalDateTime​(java.util.Date date,
                                                              java.time.ZoneOffset zoneOffset)
      • toLocalDateTime

        public static java.time.LocalDateTime toLocalDateTime​(java.util.Date date)
      • toDate

        public static java.util.Date toDate​(java.time.LocalDateTime localDateTime,
                                            java.time.ZoneOffset zoneOffset)
      • toDate

        public static java.util.Date toDate​(java.time.LocalDateTime localDateTime)