|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQDate
AQDate represents an immutable calendar date value, based on GregorianCalendar
.
AQDateFactory
, or one of the addXXX() methods of AQDate.
Example:
Method Summary | |
---|---|
AQDate |
add(int years,
int months,
int days,
int hours,
int minutes,
int seconds,
int milliseconds)
Returns a new AQDate instance which differs by the specified amount of time. |
AQDate |
addDays(int days)
Returns a new AQDate instance which differs by the number of days. |
AQDate |
addHours(int hours)
Returns a new AQDate instance which differs by the number of hours. |
AQDate |
addMilliseconds(int ms)
Returns a new AQDate instance which differs by the number of milliseconds. |
AQDate |
addMinutes(int minutes)
Returns a new AQDate instance which differs by the number of minutes. |
AQDate |
addMonths(int months)
Returns a new AQDate instance which differs by the number of months. |
AQDate |
addSeconds(int seconds)
Returns a new AQDate instance which differs by the number of seconds. |
AQDate |
addTimeZoneOffset(int ms)
Returns a new AQDate instance which time zone offset differs by
the specified number of milliseconds. |
AQDate |
addYears(int years)
Returns a new AQDate instance which differs by the number of years. |
AQDate |
convertTimeZone(String timezone)
Returns a new AQDate instance where time zone is adjusted to the specified value,
without changing the actual UTC time. |
String |
format(String pattern)
Converts the date to a string according to the specified pattern. |
String |
format(String pattern,
Object locale)
Converts the date to a string according to the specified pattern and locale. |
int |
getDay()
Returns day of month (1...31) for this date instance. |
int |
getHours()
Returns hour of day (0..23) for this date instance. |
Date |
getJavaDate()
Returns Date value |
int |
getMilliseconds()
Returns the millisecond within the second for this date instance. |
int |
getMinutes()
Returns the minute within the hour for this date instance. |
int |
getMonth()
Returns month (1..12, January is 1) for this date instance. |
int |
getSeconds()
Returns the second within the minute for this date instance. |
long |
getTimeMilliseconds()
Returns UTC time in milliseconds since January 1, 1970 00:00:00.000 GMT |
TimeZone |
getTimeZone()
Returns TimeZone value. |
int |
getTimeZoneOffset()
Returns time zone offset in milliseconds relative to GMT |
int |
getYear()
Returns Gregorian year for this date instance. |
boolean |
isEarlier(AQDate date)
Returns true if the date is earlier than the specified date. |
boolean |
isInRange(AQDate start,
AQDate end)
Returns true if the date is within the specified range (inclusive). |
boolean |
isLater(AQDate date)
Returns true if the date is later than the specified date. |
Method Detail |
---|
int getYear()
int getMonth()
int getDay()
int getHours()
int getMinutes()
int getSeconds()
int getMilliseconds()
long getTimeMilliseconds()
Date getJavaDate()
Date
value
TimeZone getTimeZone()
TimeZone
value.
int getTimeZoneOffset()
boolean isInRange(AQDate start, AQDate end)
start
- Interval start.end
- Interval end.boolean isEarlier(AQDate date)
date
- boolean isLater(AQDate date)
date
- AQDate add(int years, int months, int days, int hours, int minutes, int seconds, int milliseconds)
AQDate
instance which differs by the specified amount of time.
years
- months
- days
- hours
- minutes
- seconds
- milliseconds
- AQDate addYears(int years)
AQDate
instance which differs by the number of years.
years
- AQDate addMonths(int months)
AQDate
instance which differs by the number of months.
months
- AQDate addDays(int days)
AQDate
instance which differs by the number of days.
days
- AQDate addHours(int hours)
AQDate
instance which differs by the number of hours.
hours
- AQDate addMinutes(int minutes)
AQDate
instance which differs by the number of minutes.
minutes
- AQDate addSeconds(int seconds)
AQDate
instance which differs by the number of seconds.
seconds
- AQDate addMilliseconds(int ms)
AQDate
instance which differs by the number of milliseconds.
ms
- Milliseconds.AQDate addTimeZoneOffset(int ms)
AQDate
instance which time zone offset differs by
the specified number of milliseconds.
ms
- Time zone offset in milliseconds.AQDate convertTimeZone(String timezone)
AQDate
instance where time zone is adjusted to the specified value,
without changing the actual UTC time.
timezone
- Time zone specification as defined in TimeZone
. Example: "GMT-08:00"
Exception
- if time zone specified is invalid.String format(String pattern)
pattern
- Pattern as specified in SimpleDateFormat
.
Example: "yyyy/MM/dd HH.mm.ss"
Exception
- If pattern specified is not valid.String format(String pattern, Object locale)
pattern
- Pattern as specified in SimpleDateFormat
.
Example: "yyyy/MM/dd HH.mm.ss"locale
- Locale string as specified in Locale
. Example: "en_US"
Exception
- If pattern specified is not valid.
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |