public abstract class DemandDateTime extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
DemandDateTime() |
Modifier and Type | Method and Description |
---|---|
static DemandDateTime |
create(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour)
Create a new
DemandDateTime
We use GregorianCalendar conventions for the time parameters. |
abstract int |
getDayOfMonth()
The day of the month, from 1 to 31
|
long |
getEpochTime(TimeZone timeZone)
The epoch time with the given time zone.
|
abstract int |
getHourOfDay()
The hour of the day, from 0 to 23
|
abstract int |
getMinuteOfHour()
The minute of the hour, from 0 to 59
|
abstract int |
getMonthOfYear()
The month of the year, from 0 to 11
|
abstract int |
getYear()
The year
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public abstract int getYear()
public abstract int getMonthOfYear()
public abstract int getDayOfMonth()
public abstract int getHourOfDay()
public abstract int getMinuteOfHour()
public static DemandDateTime create(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour)
DemandDateTime
We use GregorianCalendar
conventions for the time parameters.
So invalid parameters will be handled according to the calendar behavior.year
- the yearmonthOfYear
- the month of the year, from 0 to 11dayOfMonth
- the day of the month, from 1 to 31hourOfDay
- the hour of the day, from 0 to 23minuteOfHour
- the minute of the hour, from 0 to 59public long getEpochTime(TimeZone timeZone)
timeZone
- the time zone.