public class DateTime
extends java.lang.Object
Constructor and Description |
---|
DateTime(java.util.Date date) |
DateTime(java.util.Date date,
java.util.TimeZone timeZone) |
DateTime(java.util.Date date,
java.util.TimeZone timeZone,
java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
boolean |
after(DateTime that) |
boolean |
before(DateTime that) |
static DateTime |
currentDate()
Simple representation of the current date for the default TimeZone
and Locale.
|
static DateTime |
currentDate(java.util.TimeZone timeZone) |
static DateTime |
currentDate(java.util.TimeZone timeZone,
java.util.Locale locale) |
static DateTime |
currentDateUTC() |
static DateTime |
currentDateUTC(java.util.Locale locale) |
DateTime |
dateAfter(int years,
int months) |
DateTime |
dateAfter(int years,
int months,
int days) |
DateTime |
dateAfter(int years,
int months,
int days,
int hours,
int minutes,
int seconds,
int millis) |
DateTime |
daysAfter(int days) |
boolean |
equals(java.lang.Object that) |
java.lang.String |
format(java.text.DateFormat df) |
java.lang.String |
format(java.lang.String format) |
java.lang.String |
format(java.lang.String format,
java.util.Locale locale) |
java.lang.String |
formatISO8601()
Formats a DateTime to a ISO8601 string with a second fraction part of up to 3 digits.
|
java.util.Date |
getDate() |
int |
getDayOfMonth() |
int |
getDayOfWeek() |
int |
getMonth() |
long |
getUTCTimeInMillis() |
int |
getYear() |
int |
hashCode() |
DateTime |
hoursAfter(int hours) |
DateTime |
monthsAfter(int months) |
java.lang.String |
toString() |
DateTime |
yearsAfter(int years) |
public DateTime(java.util.Date date)
public DateTime(java.util.Date date, java.util.TimeZone timeZone, java.util.Locale locale)
public DateTime(java.util.Date date, java.util.TimeZone timeZone)
public boolean after(DateTime that)
public boolean before(DateTime that)
public static DateTime currentDate()
public static DateTime currentDate(java.util.TimeZone timeZone)
public static DateTime currentDate(java.util.TimeZone timeZone, java.util.Locale locale)
public static DateTime currentDateUTC()
public static DateTime currentDateUTC(java.util.Locale locale)
public DateTime dateAfter(int years, int months)
public DateTime dateAfter(int years, int months, int days)
public DateTime dateAfter(int years, int months, int days, int hours, int minutes, int seconds, int millis)
public DateTime daysAfter(int days)
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public java.lang.String format(java.text.DateFormat df)
public java.lang.String format(java.lang.String format)
public java.lang.String format(java.lang.String format, java.util.Locale locale)
public java.lang.String formatISO8601()
public java.util.Date getDate()
public int getDayOfMonth()
public int getDayOfWeek()
public int getMonth()
public long getUTCTimeInMillis()
public int getYear()
public int hashCode()
hashCode
in class java.lang.Object
public DateTime hoursAfter(int hours)
public DateTime monthsAfter(int months)
public java.lang.String toString()
toString
in class java.lang.Object
public DateTime yearsAfter(int years)