public final class DateTime extends DateTime implements scala.math.Ordered<DateTime>, Renderable, scala.Product, java.io.Serializable
| Constructor and Description |
|---|
DateTime() |
| Modifier and Type | Method and Description |
|---|---|
static DateTime |
apply(int year,
int month,
int day,
int hour,
int minute,
int second)
Creates a new
DateTime with the given properties. |
static DateTime |
apply(long clicks)
Creates a new
DateTime from the number of milli seconds
since the start of "the epoch", namely January 1, 1970, 00:00:00 GMT. |
long |
clicks()
Returns this instant as "clicks", i.e. as milliseconds since January 1, 1970, 00:00:00 GMT
|
int |
compare(DateTime that) |
int |
day()
Returns the day of this instant in GMT.
|
boolean |
equals(java.lang.Object obj) |
static scala.Option<DateTime> |
fromIsoDateTimeString(java.lang.String string)
Creates a new DateTime instance from the given String,
if it adheres to the format
yyyy-mm-ddThh:mm:ss[.SSSZ]. |
int |
hashCode() |
int |
hour()
Returns the hour of this instant in GMT.
|
boolean |
isLeapYear()
Returns if this instant interpreted as a Date in GMT belongs to a leap year.
|
static DateTime |
MaxValue() |
DateTime |
minus(long millis)
Creates a new
DateTime that represents the point in time the given number of ms earlier. |
int |
minute()
Returns the minute of this instant in GMT.
|
static DateTime |
MinValue() |
int |
month()
Returns the month of this instant in GMT.
|
java.lang.String |
monthStr()
The month as a 3 letter abbreviation:
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov or Dec |
static DateTime |
now()
Creates a new
DateTime instance for the current point in time. |
DateTime |
plus(long millis)
Creates a new
DateTime that represents the point in time the given number of ms later. |
<R extends Rendering> |
render(R r)
yyyy-mm-ddThh:mm:ss |
<R extends Rendering> |
renderIsoDate(R r)
yyyy-mm-dd |
<R extends Rendering> |
renderIsoDateTimeString(R r)
yyyy-mm-ddThh:mm:ss |
<R extends Rendering> |
renderIsoLikeDateTimeString(R r)
yyyy-mm-dd hh:mm:ss |
<R extends Rendering> |
renderRfc1123DateTimeString(R r)
RFC1123 date string, e.g.
|
int |
second()
Returns the second of this instant in GMT.
|
java.lang.String |
toIsoDateString()
yyyy-mm-dd |
java.lang.String |
toIsoDateTimeString()
yyyy-mm-ddThh:mm:ss |
java.lang.String |
toIsoLikeDateTimeString()
yyyy-mm-dd hh:mm:ss |
java.lang.String |
toRfc1123DateTimeString()
RFC1123 date string, e.g.
|
java.lang.String |
toString()
yyyy-mm-ddThh:mm:ss |
int |
weekday()
Returns the weekday of this instant in GMT.
|
java.lang.String |
weekdayStr()
The day of the week as a 3 letter abbreviation:
Sun, Mon, Tue, Wed, Thu, Fri or Sat |
int |
year()
Returns the year of this instant in GMT.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait$greater, $greater$eq, $init$, $less, $less$eq, compareTo, orderingToOrderedpublic static DateTime MinValue()
public static DateTime MaxValue()
public static DateTime apply(int year, int month, int day, int hour, int minute, int second)
DateTime with the given properties.
Note that this implementation discards milliseconds (i.e. rounds down to full seconds).year - (undocumented)month - (undocumented)day - (undocumented)hour - (undocumented)minute - (undocumented)second - (undocumented)public static DateTime apply(long clicks)
DateTime from the number of milli seconds
since the start of "the epoch", namely January 1, 1970, 00:00:00 GMT.
Note that this implementation discards milliseconds (i.e. rounds down to full seconds).clicks - (undocumented)public static DateTime now()
DateTime instance for the current point in time.
Note that this implementation discards milliseconds (i.e. rounds down to full seconds).public static scala.Option<DateTime> fromIsoDateTimeString(java.lang.String string)
yyyy-mm-ddThh:mm:ss[.SSSZ].
Note that this implementation discards milliseconds (i.e. rounds down to full seconds).string - (undocumented)public int year()
DateTimepublic int month()
DateTimepublic int day()
DateTimepublic int hour()
DateTimepublic int minute()
DateTimepublic int second()
DateTimepublic int weekday()
DateTimepublic long clicks()
DateTimepublic boolean isLeapYear()
DateTimeisLeapYear in class DateTimepublic java.lang.String weekdayStr()
Sun, Mon, Tue, Wed, Thu, Fri or SatweekdayStr in class DateTimepublic java.lang.String monthStr()
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov or Decpublic DateTime minus(long millis)
DateTime that represents the point in time the given number of ms earlier.public DateTime plus(long millis)
DateTime that represents the point in time the given number of ms later.public <R extends Rendering> Rendering render(R r)
yyyy-mm-ddThh:mm:ssrender in interface Renderabler - (undocumented)public java.lang.String toString()
yyyy-mm-ddThh:mm:sstoString in class java.lang.Objectpublic <R extends Rendering> Rendering renderIsoDate(R r)
yyyy-mm-ddr - (undocumented)public java.lang.String toIsoDateString()
yyyy-mm-ddtoIsoDateString in class DateTimepublic <R extends Rendering> Rendering renderIsoDateTimeString(R r)
yyyy-mm-ddThh:mm:ssr - (undocumented)public java.lang.String toIsoDateTimeString()
yyyy-mm-ddThh:mm:sstoIsoDateTimeString in class DateTimepublic <R extends Rendering> Rendering renderIsoLikeDateTimeString(R r)
yyyy-mm-dd hh:mm:ssr - (undocumented)public java.lang.String toIsoLikeDateTimeString()
yyyy-mm-dd hh:mm:sstoIsoLikeDateTimeString in class DateTimepublic <R extends Rendering> Rendering renderRfc1123DateTimeString(R r)
Sun, 06 Nov 1994 08:49:37 GMTr - (undocumented)public java.lang.String toRfc1123DateTimeString()
Sun, 06 Nov 1994 08:49:37 GMTtoRfc1123DateTimeString in class DateTimepublic int compare(DateTime that)
compare in interface scala.math.Ordered<DateTime>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface scala.Equalsequals in class java.lang.Object