final case class DateTime extends javadsl.model.DateTime with Ordered[DateTime] with Renderable with Product with Serializable
Immutable, fast and efficient Date + Time implementation without any dependencies. Does not support TimeZones, all DateTime values are always GMT based. Note that this implementation discards milliseconds (i.e. rounds down to full seconds).
- Source
- DateTime.scala
- Alphabetic
- By Inheritance
- DateTime
- Serializable
- Product
- Equals
- Renderable
- Ordered
- Comparable
- DateTime
- AnyRef
- Any
- by orderingToOrdered
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(millis: Long): DateTime
Creates a new
DateTime
that represents the point in time the given number of ms later. - def -(millis: Long): DateTime
Creates a new
DateTime
that represents the point in time the given number of ms earlier. - def ->[B](y: B): (DateTime, B)
- def <(that: DateTime): Boolean
- Definition Classes
- Ordered
- def <=(that: DateTime): Boolean
- Definition Classes
- Ordered
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(that: DateTime): Boolean
- Definition Classes
- Ordered
- def >=(that: DateTime): Boolean
- Definition Classes
- Ordered
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val clicks: Long
Returns this instant as "clicks", i.e.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compare(that: DateTime): Int
- Definition Classes
- DateTime → Ordered
- def compareTo(that: DateTime): Int
- Definition Classes
- Ordered → Comparable
- val day: Int
Returns the day of this instant in GMT.
- def ensuring(cond: (DateTime) => Boolean, msg: => Any): DateTime
- def ensuring(cond: (DateTime) => Boolean): DateTime
- def ensuring(cond: Boolean, msg: => Any): DateTime
- def ensuring(cond: Boolean): DateTime
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- DateTime → Equals → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- DateTime → AnyRef → Any
- val hour: Int
Returns the hour of this instant in GMT.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isLeapYear: Boolean
Returns if this instant interpreted as a Date in GMT belongs to a leap year.
- def minus(millis: Long): DateTime
Creates a new
DateTime
that represents the point in time the given number of ms earlier. - val minute: Int
Returns the minute of this instant in GMT.
- val month: Int
Returns the month of this instant in GMT.
- def monthStr(): String
The month as a 3 letter abbreviation:
Jan
,Feb
,Mar
,Apr
,May
,Jun
,Jul
,Aug
,Sep
,Oct
,Nov
orDec
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def plus(millis: Long): DateTime
Creates a new
DateTime
that represents the point in time the given number of ms later. - def productElementNames: Iterator[String]
- Definition Classes
- Product
- def render[R <: Rendering](r: R): r.type
yyyy-mm-ddThh:mm:ss
yyyy-mm-ddThh:mm:ss
- Definition Classes
- DateTime → Renderable
- def renderIsoDate[R <: Rendering](r: R): r.type
yyyy-mm-dd
- def renderIsoDateTimeString[R <: Rendering](r: R): r.type
yyyy-mm-ddThh:mm:ss
- def renderIsoLikeDateTimeString[R <: Rendering](r: R): r.type
yyyy-mm-dd hh:mm:ss
- def renderRfc1123DateTimeString[R <: Rendering](r: R): r.type
RFC1123 date string, e.g.
RFC1123 date string, e.g.
Sun, 06 Nov 1994 08:49:37 GMT
- val second: Int
Returns the second of this instant in GMT.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toIsoDateString(): String
yyyy-mm-dd
- def toIsoDateTimeString(): String
yyyy-mm-ddThh:mm:ss
- def toIsoLikeDateTimeString(): String
yyyy-mm-dd hh:mm:ss
- def toRfc1123DateTimeString(): String
RFC1123 date string, e.g.
- def toString(): String
yyyy-mm-ddThh:mm:ss
yyyy-mm-ddThh:mm:ss
- Definition Classes
- DateTime → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val weekday: Int
Returns the weekday of this instant in GMT.
- def weekdayStr(): String
The day of the week as a 3 letter abbreviation:
Sun
,Mon
,Tue
,Wed
,Thu
,Fri
orSat
- val year: Int
Returns the year of this instant in GMT.
Shadowed Implicit Value Members
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from DateTime toany2stringadd[DateTime] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: any2stringadd[DateTime]).+(other)
- Definition Classes
- any2stringadd
- def <(that: DateTime): Boolean
- Implicit
- This member is added by an implicit conversion from DateTime toOrdered[DateTime] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: Ordered[DateTime]).<(that)
- Definition Classes
- Ordered
- def <=(that: DateTime): Boolean
- Implicit
- This member is added by an implicit conversion from DateTime toOrdered[DateTime] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: Ordered[DateTime]).<=(that)
- Definition Classes
- Ordered
- def >(that: DateTime): Boolean
- Implicit
- This member is added by an implicit conversion from DateTime toOrdered[DateTime] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: Ordered[DateTime]).>(that)
- Definition Classes
- Ordered
- def >=(that: DateTime): Boolean
- Implicit
- This member is added by an implicit conversion from DateTime toOrdered[DateTime] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: Ordered[DateTime]).>=(that)
- Definition Classes
- Ordered
- def compare(that: DateTime): Int
- Implicit
- This member is added by an implicit conversion from DateTime toOrdered[DateTime] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: Ordered[DateTime]).compare(that)
- Definition Classes
- Ordered
- def compareTo(that: DateTime): Int
- Implicit
- This member is added by an implicit conversion from DateTime toOrdered[DateTime] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(dateTime: Ordered[DateTime]).compareTo(that)
- Definition Classes
- Ordered → Comparable
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from DateTime toStringFormat[DateTime] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (DateTime, B)
- Implicit
- This member is added by an implicit conversion from DateTime toArrowAssoc[DateTime] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.