Packages

o

io.github.setl.util

DateUtils

object DateUtils

DateUtil

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DateUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. val datePattern: Regex

    Regex that matches date with the following format:

    Regex that matches date with the following format:

    • yyyy-MM-dd
  7. val datetimePattern: Regex

    Regex that matches datetime with the following format:

    Regex that matches datetime with the following format:

    • 2018-01-01 00:00:45.100+0000
    • 2018-01-01 00:00:45.100Z
    • 2018-01-01T00:00:45Z
    • 2018-01-01T00:00:45Z
    • 2018-01-01T00:00:45

    It doesn't check the validity of date, which means it can works on date like 9999-99-99 99:99:99

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def getDateFromString(date: String, pattern: String = "yyyy-MM-dd", timeZone: String = "UTC"): Date

    Parse a given date string with the given pattern to a java.sql.Date object

    Parse a given date string with the given pattern to a java.sql.Date object

    date

    date string

    pattern

    format of the given date string

    timeZone

    time zone of the given date string

  13. def getDatetimeFromString(date: String, pattern: String = "yyyy-MM-dd HH:mm:ss", timeZone: String = "UTC"): Timestamp

    Parse a given date string with the given pattern to a java.sql.Timestamp object

    Parse a given date string with the given pattern to a java.sql.Timestamp object

    date

    date string

    pattern

    format of the given date string

    timeZone

    time zone of the given date string

  14. def getFirstMinuteOfHour(date: String, pattern: String = "yyyy-MM-dd HH:mm:ss", timeZone: String = "UTC"): Timestamp

    Parse and round a given date string with the given pattern to a java.sql.Timestamp object

    Parse and round a given date string with the given pattern to a java.sql.Timestamp object

    date

    date string

    pattern

    format of the given date string

    timeZone

    time zone of the given date string

  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def reformatDateTimeString(input: String, withTime: Boolean, end: Boolean): String

    From a given date or datetime string, retrieve the correct date format (with or without time)

    From a given date or datetime string, retrieve the correct date format (with or without time)

    Note: the maximum precision is 1 second

    input

    your date/datetime string

    withTime

    true to return a datetime, false to return only a date

    end

    true to return the last seconds of the given date, false to return the first second (this only takes effect when there is no time in the given input)

    Annotations
    @throws( ... )
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped