public class DateTime extends Object implements Comparable<DateTime>, Serializable
Date,
GregorianCalendar,
TimeZone,
Serialized Form| Constructor and Description |
|---|
DateTime(int year,
int month,
int day) |
DateTime(int year,
int month,
int day,
int hour,
int minute,
int second) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DateTime other) |
static DateTime |
createDateOnly(GregorianCalendar calendar)
Creates a new date time object with the year, month and day information from the
GregorianCalendar.
|
boolean |
equals(Object o) |
int |
getDay() |
int |
getHour() |
int |
getMinute() |
int |
getMonth() |
int |
getSecond() |
int |
getYear() |
int |
hashCode() |
static DateTime |
parseIso(String s)
Parses the given String s to a DateTime object.
|
Date |
toDate(TimeZone zone) |
GregorianCalendar |
toGregorianCalendar(TimeZone zone) |
String |
toIsoFormat() |
String |
toString() |
long |
toTimeInMillisecs(TimeZone zone) |
public DateTime(int year,
int month,
int day)
public DateTime(int year,
int month,
int day,
int hour,
int minute,
int second)
public static final DateTime parseIso(String s)
null if s if
null or an empty String.IllegalArgumentException - if s has a wrong format and can't be parsed.public static final DateTime createDateOnly(GregorianCalendar calendar)
null if
calendar isnull.public int getDay()
public int getMonth()
public int getYear()
public int getHour()
public int getMinute()
public int getSecond()
public long toTimeInMillisecs(TimeZone zone)
public GregorianCalendar toGregorianCalendar(TimeZone zone)
public String toIsoFormat()
public int compareTo(DateTime other)
compareTo in interface Comparable<DateTime>Copyright © 2016. All rights reserved.