|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.util.DateTime
public class DateTime
Immutable representation of a date with an optional time and an optional time zone based on RFC 3339.
| Field Summary | |
|---|---|
boolean |
dateOnly
Specifies whether this is a date-only value. |
Integer |
tzShift
Time zone shift from UTC in minutes. |
long |
value
Date/time value expressed as the number of ms since the Unix epoch. |
| Constructor Summary | |
|---|---|
DateTime(boolean dateOnly,
long value,
Integer tzShift)
|
|
DateTime(Date value)
|
|
DateTime(Date date,
TimeZone zone)
|
|
DateTime(long value)
|
|
DateTime(long value,
Integer tzShift)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
static DateTime |
parseRfc3339(String str)
Parses an RFC 3339 date/time value. |
String |
toString()
|
String |
toStringRfc3339()
Formats the value as an RFC 3339 date/time string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final long value
public final boolean dateOnly
public final Integer tzShift
null, no time zone is set, and the time is
always interpreted as local time.
| Constructor Detail |
|---|
public DateTime(Date date,
TimeZone zone)
public DateTime(long value)
public DateTime(Date value)
public DateTime(long value,
Integer tzShift)
public DateTime(boolean dateOnly,
long value,
Integer tzShift)
| Method Detail |
|---|
public String toStringRfc3339()
public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Object
public static DateTime parseRfc3339(String str)
throws NumberFormatException
NumberFormatException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||