| java.lang.Object | |
| ↳ | com.google.api.gbase.client.DateTimeRange |
A date or date/time range, with a start and end DateTime.
Since dateTimeRange is a superclass of date
and dateTime, a DateTimeRange object can sometimes be
used to represent a single date or dateTime. When this is the case,
the start and end value will be identical and isDateTimeOnly()
will return true. You can then get the DateTime the 'range'
corresponds to using toDateTime().
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| end | The end date/time of this range. | ||||||||||
| start | The start date/time of this range. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new range.
| |||||||||||
Creates a new range that is actually a date or a dateTime.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the end date or date/time.
| |||||||||||
Gets the start date or date+time.
| |||||||||||
Checks whether this is a real range, with a start and an
end date, or a date/dateTime posing as a range.
| |||||||||||
Converts empty ranges into
DateTime. | |||||||||||
Returns the canonical string representation for a range, as used
in the XML (start " " end).
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a new range.
| start | |
|---|---|
| end |
| IllegalArgumentException | if either start or end is null |
|---|
Creates a new range that is actually a date or a dateTime.
Empty ranges (with start date the same as the end dates) can
be detected using isDateTimeOnly() and then converted
using toDateTime().
| dateTime |
|---|
| o |
|---|
Checks whether this is a real range, with a start and an
end date, or a date/dateTime posing as a range.
This hack is necessary to handle treating DateTime as
a DateTimeRange, because dateTimeRange is a supertype of
date and dateTime.
If this method returns true, you can get the DateTime
object this object corresponds to using toDateTime()
Converts empty ranges into DateTime.
| IllegalStateException | if the start and end date are
distinct, which means the dateTimeRange is neither a date
nor a dateTime (see isDateTimeOnly())
|
|---|
Returns the canonical string representation for a range, as used in the XML (start " " end).