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(): Long
Returns 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(): Int
Returns the day of this instant in GMT.
- abstract def hour(): Int
Returns the hour of this instant in GMT.
- abstract def isLeapYear(): Boolean
Returns if this instant interpreted as a Date in GMT belongs to a leap year.
- abstract def minus(millis: Long): DateTime
Creates a new
DateTime
that represents the point in time the given number of ms earlier. - abstract def minute(): Int
Returns the minute of this instant in GMT.
- abstract def month(): Int
Returns the month of this instant in GMT.
- abstract def monthStr(): String
Returns the month as a 3 letter abbreviation:
Jan
,Feb
,Mar
,Apr
,May
,Jun
,Jul
,Aug
,Sep
,Oct
,Nov
orDec
- abstract def plus(millis: Long): DateTime
Creates a new
DateTime
that represents the point in time the given number of ms later. - abstract def second(): Int
Returns the second of this instant in GMT.
- abstract def toIsoDateString(): String
Returns a String representation like this:
yyyy-mm-dd
- abstract def toIsoDateTimeString(): String
Returns a String representation like this:
yyyy-mm-ddThh:mm:ss
- abstract def toIsoLikeDateTimeString(): String
Returns a String representation like this:
yyyy-mm-dd hh:mm:ss
- abstract def toRfc1123DateTimeString(): String
Returns an RFC1123 date string, e.g.
Returns an RFC1123 date string, e.g.
Sun, 06 Nov 1994 08:49:37 GMT
- abstract def weekday(): Int
Returns 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(): String
Returns the day of the week as a 3 letter abbreviation:
Sun
,Mon
,Tue
,Wed
,Thu
,Fri
orSat
- abstract def year(): Int
Returns the year of this instant in GMT.