public class DateTime extends java.lang.Object implements DateTimeInterface, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATOM |
static java.lang.String |
COOKIE |
static java.lang.String |
ISO8601 |
static java.lang.String |
RFC1036 |
static java.lang.String |
RFC1123 |
static java.lang.String |
RFC2822 |
static java.lang.String |
RFC3339 |
static java.lang.String |
RFC822 |
static java.lang.String |
RFC850 |
static java.lang.String |
RSS |
static java.lang.String |
W3C |
Modifier | Constructor and Description |
---|---|
protected |
DateTime(Env env,
StringValue timeString) |
protected |
DateTime(Env env,
StringValue timeString,
DateTimeZone dateTimeZone) |
protected |
DateTime(QDate qDate,
DateTimeZone dateTimeZone) |
Modifier and Type | Method and Description |
---|---|
static DateTime |
__construct(Env env,
Value time,
DateTimeZone timeZone) |
DateTime |
add(DateInterval interval) |
java.lang.Object |
clone() |
DateInterval |
diff(Env env,
DateTimeInterface dateTime2,
boolean isAbsolute) |
StringValue |
format(Env env,
StringValue format) |
long |
getOffset() |
protected QDate |
getQDate() |
protected long |
getTime() |
long |
getTimestamp() |
DateTimeZone |
getTimeZone() |
void |
modify(StringValue modify) |
void |
setDate(int year,
int month,
int day) |
void |
setISODate(int year,
int week,
int day) |
void |
setTime(int hour,
int minute,
int second) |
protected void |
setTime(long time) |
DateTime |
setTimestamp(long timestamp) |
DateTime |
setTimeZone(Env env,
DateTimeZone dateTimeZone) |
java.lang.String |
toString() |
public static final java.lang.String ATOM
public static final java.lang.String COOKIE
public static final java.lang.String ISO8601
public static final java.lang.String RFC822
public static final java.lang.String RFC850
public static final java.lang.String RFC1036
public static final java.lang.String RFC1123
public static final java.lang.String RFC2822
public static final java.lang.String RFC3339
public static final java.lang.String RSS
public static final java.lang.String W3C
protected DateTime(QDate qDate, DateTimeZone dateTimeZone)
protected DateTime(Env env, StringValue timeString)
protected DateTime(Env env, StringValue timeString, DateTimeZone dateTimeZone)
public static DateTime __construct(Env env, Value time, DateTimeZone timeZone)
public DateTime add(DateInterval interval)
public java.lang.Object clone()
clone
in class java.lang.Object
public StringValue format(Env env, StringValue format)
format
in interface DateTimeInterface
public void modify(StringValue modify)
public long getTimestamp()
getTimestamp
in interface DateTimeInterface
public DateTime setTimestamp(long timestamp)
public DateTimeZone getTimeZone()
getTimeZone
in interface DateTimeInterface
public DateTime setTimeZone(Env env, DateTimeZone dateTimeZone)
public long getOffset()
getOffset
in interface DateTimeInterface
public void setTime(int hour, int minute, int second)
public void setDate(int year, int month, int day)
public void setISODate(int year, int week, int day)
public DateInterval diff(Env env, DateTimeInterface dateTime2, boolean isAbsolute)
diff
in interface DateTimeInterface
protected QDate getQDate()
protected long getTime()
protected void setTime(long time)
public java.lang.String toString()
toString
in class java.lang.Object