|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.adwords.lib.ReportDate
public final class ReportDate
Represents the midnight-to-midnight time period as observed by the AdWords server; this is the finest granularity for representing start and end dates for things like Campaigns and Reports.
This class allows you to specify a start or end date without worrying about issues of time zone or daylight savings time.
Constructor Summary | |
---|---|
ReportDate()
Creates a ReportDate object representing today. |
|
ReportDate(int year,
int month,
int date)
Creates a ReportDate object representing the calendar date specified. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Natural ordering on ReportDate s. |
boolean |
equals(java.lang.Object obj)
Returns whether two ReportDate s represent the same date. |
int |
getDate()
Returns the day of the month. |
int |
getMonth()
Returns the month (0 = January, 11 = December). |
int |
getYear()
Returns the four digit year. |
int |
hashCode()
|
java.util.Calendar |
toCalendar()
Returns a Calendar object representing the date specified by this ReportDate. |
java.lang.String |
toString()
Returns a string representing the date in the current Locale. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReportDate()
public ReportDate(int year, int month, int date)
year
- the four digit year.month
- the month (0 = January, 11 = December).date
- the day of the specified month.
java.lang.IllegalArgumentException
- if the arguments do not represent a valid
date.Method Detail |
---|
public int getYear()
public int getMonth()
public int getDate()
public java.util.Calendar toCalendar()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
ReportDate
s represent the same date.
equals
in class java.lang.Object
obj
-
obj
is a ReportDate
with the
same year, month, and date as this
.public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
ReportDate
s. A ReportDate
is less than another if it
represents a date that is earlier, greater than if it represents a date
that is later, and equal otherwise.
compareTo
in interface java.lang.Comparable
o
- the ReportDate
to compare this
to.
this
is earlier than
o
, 0 if this
is equal to
o
, a positive number otherwise.
java.lang.ClassCastException
- if o
is not a
ReportDate
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |