|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.dfp.axis.utils.v201201.Dates
public final class Dates
A utility class for handling Date objects.
| Field Summary | |
|---|---|
static String |
DATE_FORMAT
|
| Method Summary | |
|---|---|
static Date |
fromDate(Date date)
Creates a Date object from a Java Date object already set
to the publisher's timezone. |
static Date |
fromString(String dateString)
Creates a Date object from a string representation in the form
of yyyy-MM-dd (e.g. |
static Date |
toDate(Date date,
String timeZoneId)
Gets a Java Date object from a Date object. |
static Date |
today(String timeZoneId)
Gets a Date object representing midnight of the present date. |
static String |
toString(Date date,
String timeZoneId)
Gets a string representation of the Date object in the form
of yyyy-mm-dd (e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DATE_FORMAT
| Method Detail |
|---|
public static Date fromString(String dateString)
throws ParseException
Date object from a string representation in the form
of yyyy-MM-dd (e.g. 2011-01-01).
dateString - the string representation of the Date
Date object created from the string
ParseException - if the string could not be parsedpublic static Date fromDate(Date date)
Date object from a Java Date object already set
to the publisher's timezone.
date - the java.util.Date object to transform into a
Date
Date object representing datepublic static Date today(String timeZoneId)
Date object representing midnight of the present date.
Date object representing the present date
public static Date toDate(Date date,
String timeZoneId)
Date object from a Date object. The
timezone of the Date object is used when creating the new
date object.
date - the DFP Date object to convert to a Java DatetimeZoneId - the timezone of the date
Date object as a Java Date in the timezone
public static String toString(Date date,
String timeZoneId)
Date object in the form
of yyyy-mm-dd (e.g. 2011-01-01)
date - the DateTime object used to create the stringtimeZoneId - the timezone of the date
Date object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||