|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Calendar
java.util.GregorianCalendar
org.swiftgantt.common.Time
public class Time
TODO Extended from GregorianCalendar with more features
getYear(), getMonth(), getDay(), getHour(), getMinute(), getSecond()
setToFirstDayOfThisWeek(), getFirstDayOfThisWeek(), setToLastDayOfThisWeek(), getLastDayOfThisWeek()
Field Summary |
---|
Fields inherited from class java.util.GregorianCalendar |
---|
AD, BC |
Fields inherited from class java.util.Calendar |
---|
ALL_STYLES, AM, AM_PM, APRIL, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, FRIDAY, HOUR, HOUR_OF_DAY, JANUARY, JULY, JUNE, LONG, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET |
Constructor Summary | |
---|---|
Time()
|
|
Time(java.util.Calendar calendar)
|
|
Time(java.util.Date date)
|
|
Time(int year)
|
|
Time(int year,
int month)
|
|
Time(int year,
int month,
int dayOfMonth)
|
|
Time(int year,
int month,
int dayOfMonth,
int hourOfDay)
|
|
Time(int year,
int month,
int dayOfMonth,
int hourOfDay,
int minute)
|
|
Time(int year,
int month,
int dayOfMonth,
int hourOfDay,
int minute,
int second)
|
|
Time(java.util.Locale aLocale)
|
|
Time(java.util.TimeZone zone)
|
|
Time(java.util.TimeZone zone,
java.util.Locale aLocale)
|
Method Summary | |
---|---|
Time |
clone()
|
boolean |
equals(java.lang.Object obj)
|
int |
getDate()
Get day of time |
int |
getDayIntervalFrom(Time time)
|
int |
getDayIntervalTo(Time time)
|
int |
getDayOfWeek()
Get day of week. |
Time |
getFirstDayOfThisWeek()
Return the first day of the week that current time in. |
int |
getHour()
Get hour of time. |
int |
getHourIntervalFrom(Time time)
|
int |
getHourIntervalTo(Time time)
|
Time |
getLastDayOfThisWeek()
Return the last day of the week that current time in. |
int |
getMinute()
Get minute of time. |
int |
getMinuteIntervalFrom(Time time)
|
int |
getMinuteIntervalTo(Time time)
|
int |
getMonth()
Get month of time, starts from 1, not 0. |
int |
getMonthIntervalFrom(Time time)
|
int |
getMonthIntervalTo(Time time)
|
int |
getSecond()
Get second of time. |
int |
getSecondIntervalFrom(Time time)
|
int |
getSecondIntervalTo(Time time)
|
int |
getWeekIntervalFrom(Time time)
|
int |
getWeekIntervalTo(Time time)
|
int |
getYear()
Get year of time. |
int |
getYearIntervalFrom(Time time)
|
int |
getYearIntervalTo(Time time)
|
Time |
increaseDate()
|
Time |
increaseDates(int offset)
|
Time |
increaseHour()
|
Time |
increaseHours(int offset)
|
Time |
increaseMinute()
|
Time |
increaseMinutes(int offset)
|
Time |
increaseMonth()
|
Time |
increaseMonths(int offset)
|
Time |
increaseSecond()
|
Time |
increaseSeconds(int offset)
|
Time |
increaseWeek()
|
Time |
increaseWeeks(int offset)
|
Time |
increaseYear()
|
Time |
increaseYears(int offset)
|
boolean |
isRestDay()
Check if it is NOT working day in a week. |
boolean |
isWorkingDay()
Check if it is working day in a week. |
void |
setDate(int date)
Set day of time. |
void |
setHour(int hour)
Set hour of time. |
void |
setMinute(int minute)
Set minute of time. |
void |
setMonth(int month)
Set month of time. |
void |
setSecond(int second)
Set second of time. |
Time |
setToFirstDayOfThisWeek()
Set time to the first day of the week that current time in. |
Time |
setToLastDayOfThisWeek()
Set time to the last day of the week that current time in. |
void |
setYear(int year)
Set year of time. |
java.lang.String |
toString()
|
Time |
truncateAtDate()
Truncate part of time at date |
Time |
truncateAtHour()
Truncate part of time at hour |
Time |
truncateAtMinute()
Truncate part of time at minute |
Time |
truncateAtMonth()
Truncate part of time at month |
Time |
truncateAtSecond()
Truncate part of time at second |
Time |
truncateAtWeek()
Truncate part of time at week |
Time |
truncateAtYear()
Truncate part of time at year |
Methods inherited from class java.util.GregorianCalendar |
---|
add, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, hashCode, isLeapYear, roll, roll, setGregorianChange, setTimeZone |
Methods inherited from class java.util.Calendar |
---|
after, before, clear, clear, compareTo, get, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Time(java.util.Calendar calendar)
public Time(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second)
public Time(int year, int month, int dayOfMonth, int hourOfDay, int minute)
public Time(int year, int month, int dayOfMonth, int hourOfDay)
public Time(int year, int month, int dayOfMonth)
public Time(int year, int month)
public Time(int year)
public Time(java.util.TimeZone zone, java.util.Locale aLocale)
public Time(java.util.Locale aLocale)
public Time(java.util.TimeZone zone)
public Time(java.util.Date date)
public Time()
Method Detail |
---|
public Time clone()
clone
in class java.util.GregorianCalendar
public Time increaseYears(int offset)
public Time increaseYear()
public Time increaseMonths(int offset)
public Time increaseMonth()
public Time increaseWeeks(int offset)
public Time increaseWeek()
public Time increaseDates(int offset)
public Time increaseDate()
public Time increaseHours(int offset)
public Time increaseHour()
public Time increaseMinutes(int offset)
public Time increaseMinute()
public Time increaseSeconds(int offset)
public Time increaseSecond()
public Time setToFirstDayOfThisWeek()
public Time getFirstDayOfThisWeek()
public Time setToLastDayOfThisWeek()
public Time getLastDayOfThisWeek()
public boolean isWorkingDay()
public boolean isRestDay()
public Time truncateAtYear()
public Time truncateAtMonth()
public Time truncateAtWeek()
public Time truncateAtDate()
public Time truncateAtHour()
public Time truncateAtMinute()
public Time truncateAtSecond()
public int getYearIntervalFrom(Time time)
time
-
public int getYearIntervalTo(Time time)
public int getMonthIntervalFrom(Time time)
public int getMonthIntervalTo(Time time)
public int getWeekIntervalFrom(Time time)
public int getWeekIntervalTo(Time time)
public int getDayIntervalFrom(Time time)
time
-
public int getDayIntervalTo(Time time)
public int getHourIntervalFrom(Time time)
public int getHourIntervalTo(Time time)
public int getMinuteIntervalFrom(Time time)
public int getMinuteIntervalTo(Time time)
public int getSecondIntervalFrom(Time time)
public int getSecondIntervalTo(Time time)
public int getYear()
public void setYear(int year)
year
- public int getMonth()
public void setMonth(int month)
month
- public int getDate()
public void setDate(int date)
date
- public int getHour()
public void setHour(int hour)
hour
- public int getMinute()
public void setMinute(int minute)
minute
- public int getSecond()
public void setSecond(int second)
second
- public int getDayOfWeek()
public boolean equals(java.lang.Object obj)
equals
in class java.util.GregorianCalendar
public java.lang.String toString()
toString
in class java.util.Calendar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |