abstract class DateTime extends AnyRef
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.java
- Alphabetic
- By Inheritance
- DateTime
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
-  new DateTime()
Abstract Value Members
-   abstract  def clicks(): LongReturns this instant as "clicks", i.e. Returns this instant as "clicks", i.e. as milliseconds since January 1, 1970, 00:00:00 GMT 
-   abstract  def day(): IntReturns the day of this instant in GMT. 
-   abstract  def hour(): IntReturns the hour of this instant in GMT. 
-   abstract  def isLeapYear(): BooleanReturns if this instant interpreted as a Date in GMT belongs to a leap year. 
-   abstract  def minus(millis: Long): DateTimeCreates a new DateTimethat represents the point in time the given number of ms earlier.
-   abstract  def minute(): IntReturns the minute of this instant in GMT. 
-   abstract  def month(): IntReturns the month of this instant in GMT. 
-   abstract  def monthStr(): StringReturns the month as a 3 letter abbreviation: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,NovorDec
-   abstract  def plus(millis: Long): DateTimeCreates a new DateTimethat represents the point in time the given number of ms later.
-   abstract  def second(): IntReturns the second of this instant in GMT. 
-   abstract  def toIsoDateString(): StringReturns a String representation like this: yyyy-mm-dd
-   abstract  def toIsoDateTimeString(): StringReturns a String representation like this: yyyy-mm-ddThh:mm:ss
-   abstract  def toIsoLikeDateTimeString(): StringReturns a String representation like this: yyyy-mm-dd hh:mm:ss
-   abstract  def toRfc1123DateTimeString(): StringReturns an RFC1123 date string, e.g. Returns an RFC1123 date string, e.g. Sun, 06 Nov 1994 08:49:37 GMT
-   abstract  def weekday(): IntReturns the weekday of this instant in GMT. Returns the weekday of this instant in GMT. Sunday is 0, Monday is 1, etc. 
-   abstract  def weekdayStr(): StringReturns the day of the week as a 3 letter abbreviation: Sun,Mon,Tue,Wed,Thu,FriorSat
-   abstract  def year(): IntReturns the year of this instant in GMT. 
Concrete Value Members
-   final  def !=(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def ##: Int- Definition Classes
- AnyRef → Any
 
-  def +(other: String): String
-  def ->[B](y: B): (DateTime, B)
-   final  def ==(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def asInstanceOf[T0]: T0- Definition Classes
- Any
 
-    def clone(): AnyRef- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
 
-  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(arg0: AnyRef): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def getClass(): Class[_ <: AnyRef]- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
 
-    def hashCode(): Int- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
 
-   final  def isInstanceOf[T0]: Boolean- Definition Classes
- Any
 
-   final  def ne(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-   final  def notify(): Unit- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
 
-   final  def notifyAll(): Unit- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
 
-   final  def synchronized[T0](arg0: => T0): T0- Definition Classes
- AnyRef
 
-    def toString(): String- Definition Classes
- AnyRef → Any
 
-   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()
 
-   final  def wait(): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
 
Deprecated Value Members
-    def finalize(): Unit- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- (Since version 9) 
 
-    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 of- value.formatted(formatString), or use the- f""string interpolator. In Java 15 and later,- formattedresolves 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.