Class CalendarAwareDate
- All Implemented Interfaces:
de.uplanet.lucy.server.dataobjects.IDateTimeValueHolder
,IValueHolder<Date>
,Serializable
,Cloneable
,Comparable<Date>
java.sql.Timestamp
and a
de.uplanet.lucy.server.dataobjects.IDateTimeValueHolder
for Velocity scripting. It supports date-time-arithmetics through an
aggregated gregorian calendar.
For the user's convenience, methods that modify the underlying date
value come in two flavours. One that does not return a value, and one
with the same name plus an R
-suffix that returns the object
itself.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCalendarAwareDate
(long p_lTime, Calendar p_cal) Create a calendar-aware date.CalendarAwareDate
(Timestamp p_ts, Calendar p_cal) Create a calendar-aware date.CalendarAwareDate
(Date p_dt, Calendar p_cal) Create a calendar-aware date. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDays
(int p_iDays) Add to this date.void
addDays
(int p_iDays, int p_iHours) Add to this date.void
addDays
(int p_iDays, int p_iHours, int p_iMinutes) Add to this date.void
addDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Add to this date.void
addDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date.addDaysR
(int p_iDays) Add to this date.addDaysR
(int p_iDays, int p_iHours) Add to this date.addDaysR
(int p_iDays, int p_iHours, int p_iMinutes) Add to this date.addDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Add to this date.addDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date.void
addMilliseconds
(long p_lMilliseconds) Add the given number of milliseconds to the underlying value that represents this instance in time.addMillisecondsR
(long p_lMilliseconds) Same asaddMilliseconds(long)
but returns this object.void
addMonths
(int p_iMonths) Add to this date.addMonthsR
(int p_iMonths) Same asaddMonths(int)
but returns this object.void
addUTCDays
(int p_iDays) Add to this date.void
addUTCDays
(int p_iDays, int p_iHours) Add to this date.void
addUTCDays
(int p_iDays, int p_iHours, int p_iMinutes) Add to this date.void
addUTCDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Add to this date.void
addUTCDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date.addUTCDaysR
(int p_iDays) Add to this date.addUTCDaysR
(int p_iDays, int p_iHours) Add to this date.addUTCDaysR
(int p_iDays, int p_iHours, int p_iMinutes) Add to this date.addUTCDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Add to this date.addUTCDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date.void
addUTCMonths
(int p_iMonths) Add to this date.addUTCMonthsR
(int p_iMonths) Add to this date.void
addUTCYears
(int p_iYears) Add to this date.addUTCYearsR
(int p_iYears) Add to this date.void
addYears
(int p_iYears) Add to this date.addYearsR
(int p_iYears) Same asaddYears(int)
but returns this object.asTime()
Get the current time, i.e.clone()
Format this date using the given simple date format in the given time zone.Format this date using the given simple date format in the given time zone.Format this date using the given simple date format in the UTC time zone.Format this date using the given simple date format in the UTC time zone.Get the canonical lexical representation of this value according to it's datatype.int
getDay()
Deprecated.int
getDayEs()
Get the day of week as specified in ECMA-262 (ECMAScript Language Specification).int
Get the (1-based) day of month, as interpreted in the given time zone.int
Get the (1-based) day of week, as interpreted in the given time zone.int
Get the year, as interpreted in the given time zone.int
getHours()
Get the hour of day, as interpreted in the given time zone.int
Get the milliseconds, as interpreted in the given time zone.int
Get the minute, as interpreted in the given time zone.int
getMonth()
Get the (0-based) month, as interpreted in the given time zone.Get the raw data that this value holder holds.int
Get the seconds, as interpreted in the given time zone.getType()
The type of data this value holder holds.int
Get the (1-based) day of month, as interpreted in the UTC time zone.int
Get the day of week as specified in ECMA-262 (ECMAScript Language Specification), interpreted in the UTC time zone.int
Get the (1-based) day of month, as interpreted in the UTC time zone.int
Get the (1-based) day of week, as interpreted in the UTC time zone.int
Get the year, as interpreted in the UTC time zone.int
Get the hour of day, as interpreted in the UTC time zone.int
Get the milliseconds, as interpreted in the UTC time zone.int
Get the minute, as interpreted in the UTC time zone.int
Get the (0-based) month, as interpreted in the UTC time zone.int
Get the seconds, as interpreted in the UTC time zone.getValue()
Get the data that this value holder holds.int
getYear()
Deprecated.boolean
hasValue()
Check if this value holder currently holds data or not.boolean
isFriday()
boolean
isMonday()
boolean
boolean
isSunday()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
Modify this date according to the rules specified in thep_strRules
parameter in the given time zone.void
Modify this date according to the rules specified in thep_strRules
parameter in the given time zone.Same asmodify(String)
but returns this object.Same asmodify(String, boolean)
but returns this object.void
Modify this date according to the rules specified in thep_strRules
parameter in the UTC time zone.void
Modify this date according to the rules specified in thep_strRules
parameter in the given time zone.modifyUTCR
(String p_strRules) Same asmodifyUTC(String)
but returns this object.modifyUTCR
(String p_strRules, boolean p_bClearMillis) Same asmodifyUTC(String, boolean)
but returns this object.void
setDayOfMonth
(int p_iDay) Set the (1-based) day of month, as interpreted in the given time zone.setDayOfMonthR
(int p_iDay) Same assetDayOfMonth(int)
but returns this object.void
setFullYear
(int p_iYear) Set the year, as interpreted in the given time zone.void
setFullYear
(int p_iYear, int p_iMonth) Set the year, and month, as interpreted in the given time zone.void
setFullYear
(int p_iYear, int p_iMonth, int p_iDay) Set the year, month, and day, as interpreted in the given time zone.setFullYearR
(int p_iYear) Same assetFullYear(int)
but returns this object.setFullYearR
(int p_iYear, int p_iMonth) Same assetFullYear(int, int)
but returns this object.setFullYearR
(int p_iYear, int p_iMonth, int p_iDay) Same assetFullYear(int, int, int)
but returns this object.void
setHours
(int p_iHours) Set the hour of day, as interpreted in the given time zone.void
setHours
(int p_iHours, int p_iMinutes) Set the hour, and minute, as interpreted in the given time zone.void
setHours
(int p_iHours, int p_iMinutes, int p_iSeconds) Set the hour, minute, and second, as interpreted in the given time zone.void
setHours
(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the hour, minute, second, and milliseconds, as interpreted in the given time zone.setHoursR
(int p_iHours) Same assetHours(int)
but returns this object.setHoursR
(int p_iHours, int p_iMinutes) Same assetHours(int, int)
but returns this object.setHoursR
(int p_iHours, int p_iMinutes, int p_iSeconds) Same assetHours(int, int, int)
but returns this object.setHoursR
(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Same assetHours(int, int, int, int)
but returns this object.void
setMilliseconds
(int p_iMilliseconds) Set the milliseconds, as interpreted in the given time zone.setMillisecondsR
(int p_iMilliseconds) Same assetMilliseconds(int)
but returns this object.void
setMinutes
(int p_iMinutes) Set the minute, as interpreted in the given time zone.void
setMinutes
(int p_iMinutes, int p_iSeconds) Set the minute, and second, as interpreted in the given time zone.void
setMinutes
(int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the minute, second, and milliseconds, as interpreted in the given time zone.setMinutesR
(int p_iMinutes) Same assetMinutes(int)
but returns this object.setMinutesR
(int p_iMinutes, int p_iSeconds) Same assetMinutes(int, int)
but returns this object.setMinutesR
(int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Same assetMinutes(int, int, int)
but returns this object.void
setMonth
(int p_iMonth) Set the month, and day, as interpreted in the given time zone.void
setMonth
(int p_iMonth, int p_iDay) Set the month, and day, as interpreted in the given time zone.setMonthR
(int p_iMonth) Same assetMonth(int)
but returns this object.setMonthR
(int p_iMonth, int p_iDay) Same assetMonth(int, int)
but returns this object.void
setSeconds
(int p_iSeconds) Set the seconds, as interpreted in the given time zone.void
setSeconds
(int p_iSeconds, int p_iMilliseconds) Set the second, and milliseconds, as interpreted in the given time zone.setSecondsR
(int p_iSeconds) Same assetSeconds(int)
but returns this object.setSecondsR
(int p_iSeconds, int p_iMilliseconds) Same assetSeconds(int, int)
but returns this object.void
Set this date to the begin of day, as interpreted in the given time zone.Same assetToBeginOfDay()
but returns this object.void
Set this date to the end of day, as interpreted in the given time zone.Same assetToEndOfDay()
but returns this object.void
setToStartOfWeek
(int p_iFirstDayOfWeek) Set this date to the start of the week, as interpreted in the given time zone.setToStartOfWeekR
(int p_iFirstDayOfWeek) Same assetToStartOfWeek(int)
but returns this object.void
setUTCDate
(int p_iDay) Set the (1-based) day of month, as interpreted in the UTC time zone.setUTCDateR
(int p_iDay) Same assetUTCDate(int)
but returns this object.void
setUTCDayOfMonth
(int p_iDay) Set the (1-based) day of month, as interpreted in the UTC time zone.setUTCDayOfMonthR
(int p_iDay) Same assetUTCDayOfMonth(int)
but returns this object.void
setUTCFullYear
(int p_iYear) Set the year, as interpreted in the UTC time zone.void
setUTCFullYear
(int p_iYear, int p_iMonth) Set the year, and month, as interpreted in the UTC time zone.void
setUTCFullYear
(int p_iYear, int p_iMonth, int p_iDay) Set the year, month, and day, as interpreted in the UTC time zone.setUTCFullYearR
(int p_iYear) Same assetUTCFullYear(int)
but returns this object.setUTCFullYearR
(int p_iYear, int p_iMonth) Same assetUTCFullYear(int, int)
but returns this object.setUTCFullYearR
(int p_iYear, int p_iMonth, int p_iDay) Same assetUTCFullYear(int, int, int)
but returns this object.void
setUTCHours
(int p_iHours) Set the hour of day, as interpreted in the UTC time zone.void
setUTCHours
(int p_iHours, int p_iMinutes) Set the hour, and minute, as interpreted in the UTC time zone.void
setUTCHours
(int p_iHours, int p_iMinutes, int p_iSeconds) Set the hour, minute, and second, as interpreted in the UTC time zone.void
setUTCHours
(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the hour, minute, and second, as interpreted in the UTC time zone.setUTCHoursR
(int p_iHours) Same assetUTCHours(int)
but returns this object.setUTCHoursR
(int p_iHours, int p_iMinutes) Same assetUTCHours(int, int)
but returns this object.setUTCHoursR
(int p_iHours, int p_iMinutes, int p_iSeconds) Same assetUTCHours(int, int, int)
but returns this object.setUTCHoursR
(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Same assetUTCHours(int, int, int)
but returns this object.void
setUTCMilliseconds
(int p_iMilliseconds) Set the milliseconds, as interpreted in the UTC time zone.setUTCMillisecondsR
(int p_iMilliseconds) Same assetUTCMilliseconds(int)
but returns this object.void
setUTCMinutes
(int p_iMinutes) Set the minute, as interpreted in the UTC time zone.void
setUTCMinutes
(int p_iMinutes, int p_iSeconds) Set the minute, and second, as interpreted in the UTC time zone.void
setUTCMinutes
(int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the minute, second, and milliseconds, as interpreted in the UTC time zone.setUTCMinutesR
(int p_iMinutes) Same assetUTCMinutes(int)
but returns this object.setUTCMinutesR
(int p_iMinutes, int p_iSeconds) Same assetUTCMinutes(int, int)
but returns this object.setUTCMinutesR
(int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Same assetUTCMinutes(int, int, int)
but returns this object.void
setUTCMonth
(int p_iMonth) Set the month, and day, as interpreted in the UTC time zone.void
setUTCMonth
(int p_iMonth, int p_iDay) Set the month, and day, as interpreted in the UTC time zone.setUTCMonthR
(int p_iMonth) Same assetUTCMonth(int)
but returns this object.setUTCMonthR
(int p_iMonth, int p_iDay) Same assetUTCMonthR(int, int)
but returns this object.void
setUTCSeconds
(int p_iSeconds) Set the seconds, as interpreted in the UTC time zone.void
setUTCSeconds
(int p_iSeconds, int p_iMilliseconds) Set the second, and milliseconds, as interpreted in the UTC time zone.setUTCSecondsR
(int p_iSeconds) Same assetUTCSeconds(int)
but returns this object.setUTCSecondsR
(int p_iSeconds, int p_iMilliseconds) Same assetUTCSeconds(int, int)
but returns this object.void
Set this date to the begin of day, as interpreted in the UTC time zone.Same assetUTCToBeginOfDay()
but returns this object.void
Set this date to the end of day, as interpreted in the UTC time zone.Same assetUTCToEndOfDay()
but returns this object.void
setYear
(int p_iValue) Deprecated.void
subDays
(int p_iDays) Subtract from this date.void
subDays
(int p_iDays, int p_iHours) Subtract from this date.void
subDays
(int p_iDays, int p_iHours, int p_iMinutes) Subtract from this date.void
subDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Subtract from this date.void
subDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date.subDaysR
(int p_iDays) Subtract from this date.subDaysR
(int p_iDays, int p_iHours) Subtract from this date.subDaysR
(int p_iDays, int p_iHours, int p_iMinutes) Subtract from this date.subDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Subtract from this date.subDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date.void
subMilliseconds
(long p_lMilliseconds) Subtract the given number of milliseconds to the underlying value that represents this instance in time.subMillisecondsR
(long p_lMillis) Same assubMilliseconds(long)
but returns this object.void
subMonths
(int p_iMonths) Subtract from this date.subMonthsR
(int p_iMonths) Same assubMonths(int)
but returns this object.void
subUTCDays
(int p_iDays) Subtract from this date.void
subUTCDays
(int p_iDays, int p_iHours) Subtract from this date.void
subUTCDays
(int p_iDays, int p_iHours, int p_iMinutes) Subtract from this date.void
subUTCDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Subtract from this date.void
subUTCDays
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date.subUTCDaysR
(int p_iDays) Subtract from this date.subUTCDaysR
(int p_iDays, int p_iHours) Subtract from this date.subUTCDaysR
(int p_iDays, int p_iHours, int p_iMinutes) Subtract from this date.subUTCDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Subtract from this date.subUTCDaysR
(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date.void
subUTCMonths
(int p_iMonths) Subtract from this date.subUTCMonthsR
(int p_iMonths) Subtract from this date.void
subUTCYears
(int p_iYears) Subtract from this date.subUTCYearsR
(int p_iYears) Subtract from this date.void
subYears
(int p_iYears) Subtract from this date.subYearsR
(int p_iYears) Same asaddYears(int)
but returns this object.toJSON()
Return string that represents this date object jsonified.Return a human-readable string that represents this date object, in UTC.unwrap()
withTimeZone
(String p_strTimeZone) Create a copy of this date object and associate a calendar with the given time zone with it.withTimeZone
(TimeZone p_tz) Create a copy of this date object and associate a calendar with the given time zone with it.Methods inherited from class java.sql.Timestamp
after, before, compareTo, compareTo, equals, equals, from, getNanos, getTime, hashCode, setNanos, setTime, toInstant, toLocalDateTime, toString, valueOf, valueOf
Methods inherited from class java.util.Date
after, before, getDate, getTimezoneOffset, parse, setDate, toGMTString, toLocaleString, UTC
-
Field Details
-
SUNDAY
public static final int SUNDAY1- See Also:
-
MONDAY
public static final int MONDAY2- See Also:
-
TUESDAY
public static final int TUESDAY3- See Also:
-
WEDNESDAY
public static final int WEDNESDAY4- See Also:
-
THURSDAY
public static final int THURSDAY5- See Also:
-
FRIDAY
public static final int FRIDAY6- See Also:
-
SATURDAY
public static final int SATURDAY7- See Also:
-
-
Constructor Details
-
CalendarAwareDate
Create a calendar-aware date.Note: The given calendar MUST NOT be modified by the caller.
- Parameters:
p_lTime
- The date.p_cal
- The calendar to be used for calculations.
-
CalendarAwareDate
Create a calendar-aware date.Note: The given calendar MUST NOT be modified by the caller.
- Parameters:
p_dt
- The date.p_cal
- The calendar to be used for calculations.
-
CalendarAwareDate
Create a calendar-aware date.Note: The given calendar MUST NOT be modified by the caller.
- Parameters:
p_ts
- The date.p_cal
- The calendar to be used for calculations.
-
-
Method Details
-
clone
-
withTimeZone
Create a copy of this date object and associate a calendar with the given time zone with it.- Parameters:
p_tz
- The time zone.- Returns:
- The copy with the given time zone.
-
withTimeZone
Create a copy of this date object and associate a calendar with the given time zone with it.- Parameters:
p_strTimeZone
- The time zone identifier.- Returns:
- The copy with the given time zone.
-
getYear
Deprecated.UsegetFullYear()
instead.Returns a value that is the result of subtracting1900
from the year, as interpreted in the given time zone.A call to this method is effectively equivalent with
getFullYear() - 1900
. -
setYear
Deprecated.Set the year to the specified value plus1900
, as interpreted in the given time zone. -
getFullYear
public int getFullYear()Get the year, as interpreted in the given time zone.- Returns:
- The year.
-
setFullYear
public void setFullYear(int p_iYear) Set the year, as interpreted in the given time zone.- Parameters:
p_iYear
- The year.
-
setFullYearR
Same assetFullYear(int)
but returns this object.- Parameters:
p_iYear
- The year.- Returns:
- This object.
-
setFullYear
public void setFullYear(int p_iYear, int p_iMonth) Set the year, and month, as interpreted in the given time zone.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.
-
setFullYearR
Same assetFullYear(int, int)
but returns this object.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.- Returns:
- This object.
-
setFullYear
public void setFullYear(int p_iYear, int p_iMonth, int p_iDay) Set the year, month, and day, as interpreted in the given time zone.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.p_iDay
- The (1-based) day of month.
-
setFullYearR
Same assetFullYear(int, int, int)
but returns this object.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.p_iDay
- The (1-based) day of month.- Returns:
- This object.
-
getUTCFullYear
public int getUTCFullYear()Get the year, as interpreted in the UTC time zone.- Returns:
- The year.
-
setUTCFullYear
public void setUTCFullYear(int p_iYear) Set the year, as interpreted in the UTC time zone.- Parameters:
p_iYear
- The year.
-
setUTCFullYearR
Same assetUTCFullYear(int)
but returns this object.- Parameters:
p_iYear
- The year.- Returns:
- This object.
-
setUTCFullYear
public void setUTCFullYear(int p_iYear, int p_iMonth) Set the year, and month, as interpreted in the UTC time zone.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.
-
setUTCFullYearR
Same assetUTCFullYear(int, int)
but returns this object.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.- Returns:
- This object.
-
setUTCFullYear
public void setUTCFullYear(int p_iYear, int p_iMonth, int p_iDay) Set the year, month, and day, as interpreted in the UTC time zone.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.p_iDay
- The (1-based) day of month.
-
setUTCFullYearR
Same assetUTCFullYear(int, int, int)
but returns this object.- Parameters:
p_iYear
- The year.p_iMonth
- The (0-based) month.p_iDay
- The (1-based) day of month.- Returns:
- This object.
-
getMonth
public int getMonth()Get the (0-based) month, as interpreted in the given time zone.0
represents January, ...,11
represents December. -
setMonth
public void setMonth(int p_iMonth) Set the month, and day, as interpreted in the given time zone. -
setMonthR
Same assetMonth(int)
but returns this object.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.- Returns:
- This object.
-
setMonth
public void setMonth(int p_iMonth, int p_iDay) Set the month, and day, as interpreted in the given time zone.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.p_iDay
- The (1-based) day of month.
-
setMonthR
Same assetMonth(int, int)
but returns this object.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.p_iDay
- The (1-based) day of month.- Returns:
- This object.
-
getUTCMonth
public int getUTCMonth()Get the (0-based) month, as interpreted in the UTC time zone.0
represents January, ...,11
represents December. -
setUTCMonth
public void setUTCMonth(int p_iMonth) Set the month, and day, as interpreted in the UTC time zone.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.
-
setUTCMonthR
Same assetUTCMonth(int)
but returns this object.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.- Returns:
- This object.
-
setUTCMonth
public void setUTCMonth(int p_iMonth, int p_iDay) Set the month, and day, as interpreted in the UTC time zone.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.p_iDay
- The (1-based) day of month.
-
setUTCMonthR
Same assetUTCMonthR(int, int)
but returns this object.- Parameters:
p_iMonth
- The month.0
represents January, ...,11
represents December.p_iDay
- The (1-based) day of month.- Returns:
- This object.
-
getDay
Deprecated. -
getDayEs
public int getDayEs()Get the day of week as specified in ECMA-262 (ECMAScript Language Specification).0 specifies Sunday; 1 specifies Monday; 2 specifies Tuesday; 3 specifies Wednesday; 4 specifies Thursday; 5 specifies Friday; and 6 specifies Saturday.
See also ECMA-262, 15.9.5.16.
- Returns:
- The day of week.
-
getUTCDayEs
public int getUTCDayEs()Get the day of week as specified in ECMA-262 (ECMAScript Language Specification), interpreted in the UTC time zone.0 specifies Sunday; 1 specifies Monday; 2 specifies Tuesday; 3 specifies Wednesday; 4 specifies Thursday; 5 specifies Friday; and 6 specifies Saturday.
See also ECMA-262, 15.9.5.17.
- Returns:
- The day of week.
-
getDayOfWeek
public int getDayOfWeek()Get the (1-based) day of week, as interpreted in the given time zone.- Returns:
- The day of week.
- See Also:
-
isMonday
public boolean isMonday() -
isTuesday
public boolean isTuesday() -
isWednesday
public boolean isWednesday() -
isThursday
public boolean isThursday() -
isFriday
public boolean isFriday() -
isSaturday
public boolean isSaturday() -
isSunday
public boolean isSunday() -
getUTCDayOfWeek
public int getUTCDayOfWeek()Get the (1-based) day of week, as interpreted in the UTC time zone.- Returns:
- The day of week.
- See Also:
-
isUTCMonday
public boolean isUTCMonday() -
isUTCTuesday
public boolean isUTCTuesday() -
isUTCWednesday
public boolean isUTCWednesday() -
isUTCThursday
public boolean isUTCThursday() -
isUTCFriday
public boolean isUTCFriday() -
isUTCSaturday
public boolean isUTCSaturday() -
isUTCSunday
public boolean isUTCSunday() -
getDayOfMonth
public int getDayOfMonth()Get the (1-based) day of month, as interpreted in the given time zone.- Returns:
- The day of month.
-
setDayOfMonth
public void setDayOfMonth(int p_iDay) Set the (1-based) day of month, as interpreted in the given time zone.- Parameters:
p_iDay
- The day of month.
-
setDayOfMonthR
Same assetDayOfMonth(int)
but returns this object.- Parameters:
p_iDay
- The day of month.- Returns:
- This object.
-
getUTCDayOfMonth
public int getUTCDayOfMonth()Get the (1-based) day of month, as interpreted in the UTC time zone.- Returns:
- The day of month.
-
setUTCDayOfMonth
public void setUTCDayOfMonth(int p_iDay) Set the (1-based) day of month, as interpreted in the UTC time zone.- Parameters:
p_iDay
- The day of month.
-
setUTCDayOfMonthR
Same assetUTCDayOfMonth(int)
but returns this object.- Parameters:
p_iDay
- The day of month.- Returns:
- This object.
-
getUTCDate
public int getUTCDate()Get the (1-based) day of month, as interpreted in the UTC time zone.See also ECMA-262, 15.9.5.15.
- Returns:
- The day of month.
-
setUTCDate
public void setUTCDate(int p_iDay) Set the (1-based) day of month, as interpreted in the UTC time zone.See also ECMA-262, 15.9.5.37.
- Parameters:
p_iDay
- The day of month.
-
setUTCDateR
Same assetUTCDate(int)
but returns this object.- Parameters:
p_iDay
- The day of month.- Returns:
- This object.
-
getHours
public int getHours()Get the hour of day, as interpreted in the given time zone. -
setHours
public void setHours(int p_iHours) Set the hour of day, as interpreted in the given time zone. -
setHoursR
Same assetHours(int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).- Returns:
- This object.
-
setHours
public void setHours(int p_iHours, int p_iMinutes) Set the hour, and minute, as interpreted in the given time zone.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.
-
setHoursR
Same assetHours(int, int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.- Returns:
- This object.
-
setHours
public void setHours(int p_iHours, int p_iMinutes, int p_iSeconds) Set the hour, minute, and second, as interpreted in the given time zone.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.
-
setHoursR
Same assetHours(int, int, int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.- Returns:
- This object.
-
setHours
public void setHours(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the hour, minute, second, and milliseconds, as interpreted in the given time zone.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.
-
setHoursR
public CalendarAwareDate setHoursR(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Same assetHours(int, int, int, int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
setToBeginOfDay
public void setToBeginOfDay()Set this date to the begin of day, as interpreted in the given time zone.Same as
setHours(0, 0, 0, 0)
. -
setToBeginOfDayR
Same assetToBeginOfDay()
but returns this object.- Returns:
- This object.
-
setToEndOfDay
public void setToEndOfDay()Set this date to the end of day, as interpreted in the given time zone.Same as
setHours(24, 0, 0, 0)
. -
setToEndOfDayR
Same assetToEndOfDay()
but returns this object.- Returns:
- This object.
-
setToStartOfWeek
public void setToStartOfWeek(int p_iFirstDayOfWeek) Set this date to the start of the week, as interpreted in the given time zone.- Parameters:
p_iFirstDayOfWeek
- The day the weeks starts with (1 for Sunday, 2 for Monday, ..., 7 for Saturday).
-
setToStartOfWeekR
Same assetToStartOfWeek(int)
but returns this object.- Returns:
- This object.
-
getUTCHours
public int getUTCHours()Get the hour of day, as interpreted in the UTC time zone.- Returns:
- A number from 0 through 23.
-
setUTCHours
public void setUTCHours(int p_iHours) Set the hour of day, as interpreted in the UTC time zone.- Parameters:
p_iHours
- The hour (0 through 23).
-
setUTCHoursR
Same assetUTCHours(int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).- Returns:
- This object.
-
setUTCHours
public void setUTCHours(int p_iHours, int p_iMinutes) Set the hour, and minute, as interpreted in the UTC time zone.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.
-
setUTCHoursR
Same assetUTCHours(int, int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.- Returns:
- This object.
-
setUTCHours
public void setUTCHours(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the hour, minute, and second, as interpreted in the UTC time zone.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.
-
setUTCHoursR
public CalendarAwareDate setUTCHoursR(int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Same assetUTCHours(int, int, int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
setUTCHours
public void setUTCHours(int p_iHours, int p_iMinutes, int p_iSeconds) Set the hour, minute, and second, as interpreted in the UTC time zone.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.
-
setUTCHoursR
Same assetUTCHours(int, int, int)
but returns this object.- Parameters:
p_iHours
- The hour (0 through 23).p_iMinutes
- The minutes.p_iSeconds
- The seconds.- Returns:
- This object.
-
setUTCToBeginOfDay
public void setUTCToBeginOfDay()Set this date to the begin of day, as interpreted in the UTC time zone.Same as
setUTCHours(0, 0, 0, 0)
. -
setUTCToBeginOfDayR
Same assetUTCToBeginOfDay()
but returns this object.- Returns:
- This object.
-
setUTCToEndOfDay
public void setUTCToEndOfDay()Set this date to the end of day, as interpreted in the UTC time zone.Same as
setUTCHours(24, 0, 0, 0)
. -
setUTCToEndOfDayR
Same assetUTCToEndOfDay()
but returns this object.- Returns:
- This object.
-
getMinutes
public int getMinutes()Get the minute, as interpreted in the given time zone.- Overrides:
getMinutes
in classDate
- Returns:
- The minute.
-
setMinutes
public void setMinutes(int p_iMinutes) Set the minute, as interpreted in the given time zone.- Overrides:
setMinutes
in classDate
- Parameters:
p_iMinutes
- The minutes.
-
setMinutesR
Same assetMinutes(int)
but returns this object.- Parameters:
p_iMinutes
- The minutes.- Returns:
- This object.
-
setMinutes
public void setMinutes(int p_iMinutes, int p_iSeconds) Set the minute, and second, as interpreted in the given time zone.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.
-
setMinutesR
Same assetMinutes(int, int)
but returns this object.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.- Returns:
- This object.
-
setMinutes
public void setMinutes(int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the minute, second, and milliseconds, as interpreted in the given time zone.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.
-
setMinutesR
Same assetMinutes(int, int, int)
but returns this object.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
getUTCMinutes
public int getUTCMinutes()Get the minute, as interpreted in the UTC time zone.- Returns:
- The minute.
-
setUTCMinutes
public void setUTCMinutes(int p_iMinutes) Set the minute, as interpreted in the UTC time zone.- Parameters:
p_iMinutes
- The minutes.
-
setUTCMinutesR
Same assetUTCMinutes(int)
but returns this object.- Parameters:
p_iMinutes
- The minutes.- Returns:
- This object.
-
setUTCMinutes
public void setUTCMinutes(int p_iMinutes, int p_iSeconds) Set the minute, and second, as interpreted in the UTC time zone.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.
-
setUTCMinutesR
Same assetUTCMinutes(int, int)
but returns this object.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.- Returns:
- This object.
-
setUTCMinutes
public void setUTCMinutes(int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Set the minute, second, and milliseconds, as interpreted in the UTC time zone.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.
-
setUTCMinutesR
Same assetUTCMinutes(int, int, int)
but returns this object.- Parameters:
p_iMinutes
- The minutes.p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
getSeconds
public int getSeconds()Get the seconds, as interpreted in the given time zone.- Overrides:
getSeconds
in classDate
- Returns:
- The seconds.
-
setSeconds
public void setSeconds(int p_iSeconds) Set the seconds, as interpreted in the given time zone.- Overrides:
setSeconds
in classDate
- Parameters:
p_iSeconds
- The seconds.
-
setSecondsR
Same assetSeconds(int)
but returns this object.- Parameters:
p_iSeconds
- The seconds.- Returns:
- This object.
-
setSeconds
public void setSeconds(int p_iSeconds, int p_iMilliseconds) Set the second, and milliseconds, as interpreted in the given time zone.- Parameters:
p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.
-
setSecondsR
Same assetSeconds(int, int)
but returns this object.- Parameters:
p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
getUTCSeconds
public int getUTCSeconds()Get the seconds, as interpreted in the UTC time zone.- Returns:
- The seconds.
-
setUTCSeconds
public void setUTCSeconds(int p_iSeconds) Set the seconds, as interpreted in the UTC time zone.- Parameters:
p_iSeconds
- The seconds.
-
setUTCSecondsR
Same assetUTCSeconds(int)
but returns this object.- Parameters:
p_iSeconds
- The seconds.- Returns:
- This object.
-
setUTCSeconds
public void setUTCSeconds(int p_iSeconds, int p_iMilliseconds) Set the second, and milliseconds, as interpreted in the UTC time zone.- Parameters:
p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.
-
setUTCSecondsR
Same assetUTCSeconds(int, int)
but returns this object.- Parameters:
p_iSeconds
- The seconds.p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
getMilliseconds
public int getMilliseconds()Get the milliseconds, as interpreted in the given time zone.- Returns:
- The milliseconds.
-
setMilliseconds
public void setMilliseconds(int p_iMilliseconds) Set the milliseconds, as interpreted in the given time zone.- Parameters:
p_iMilliseconds
- The milliseconds.
-
setMillisecondsR
Same assetMilliseconds(int)
but returns this object.- Parameters:
p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
getUTCMilliseconds
public int getUTCMilliseconds()Get the milliseconds, as interpreted in the UTC time zone.- Returns:
- The milliseconds.
-
setUTCMilliseconds
public void setUTCMilliseconds(int p_iMilliseconds) Set the milliseconds, as interpreted in the UTC time zone.- Parameters:
p_iMilliseconds
- The milliseconds.
-
setUTCMillisecondsR
Same assetUTCMilliseconds(int)
but returns this object.- Parameters:
p_iMilliseconds
- The milliseconds.- Returns:
- This object.
-
addMilliseconds
public void addMilliseconds(long p_lMilliseconds) Add the given number of milliseconds to the underlying value that represents this instance in time.Note that this calculation does not involve any calendar semantics.
- Parameters:
p_lMilliseconds
- The number of milliseconds to be added.
-
addMillisecondsR
Same asaddMilliseconds(long)
but returns this object.- Parameters:
p_lMilliseconds
- The number of milliseconds to be added.- Returns:
- This object.
-
subMilliseconds
public void subMilliseconds(long p_lMilliseconds) Subtract the given number of milliseconds to the underlying value that represents this instance in time.Note that this calculation does not involve any calendar semantics.
- Parameters:
p_lMilliseconds
- The number of milliseconds to be subtracted.
-
subMillisecondsR
Same assubMilliseconds(long)
but returns this object.- Parameters:
p_lMillis
- The number of milliseconds to be subtracted.- Returns:
- This object.
-
addYears
public void addYears(int p_iYears) Add to this date. -
addYearsR
Same asaddYears(int)
but returns this object.- Returns:
- This object.
-
subYears
public void subYears(int p_iYears) Subtract from this date. -
subYearsR
Same asaddYears(int)
but returns this object.- Returns:
- This object.
-
addMonths
public void addMonths(int p_iMonths) Add to this date. -
addMonthsR
Same asaddMonths(int)
but returns this object.- Returns:
- This object.
-
subMonths
public void subMonths(int p_iMonths) Subtract from this date. -
subMonthsR
Same assubMonths(int)
but returns this object.- Returns:
- This object.
-
addDays
public void addDays(int p_iDays) Add to this date. -
addDaysR
Add to this date.- Returns:
- This object.
-
addDays
public void addDays(int p_iDays, int p_iHours) Add to this date. -
addDaysR
Add to this date.- Returns:
- This object.
-
addDays
public void addDays(int p_iDays, int p_iHours, int p_iMinutes) Add to this date. -
addDaysR
Add to this date.- Returns:
- This object.
-
addDays
public void addDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Add to this date. -
addDaysR
Add to this date.- Returns:
- This object.
-
addDays
public void addDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date. -
addDaysR
public CalendarAwareDate addDaysR(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date.- Returns:
- This object.
-
subDays
public void subDays(int p_iDays) Subtract from this date. -
subDaysR
Subtract from this date.- Returns:
- This object.
-
subDays
public void subDays(int p_iDays, int p_iHours) Subtract from this date. -
subDaysR
Subtract from this date.- Returns:
- This object.
-
subDays
public void subDays(int p_iDays, int p_iHours, int p_iMinutes) Subtract from this date. -
subDaysR
Subtract from this date.- Returns:
- This object.
-
subDays
public void subDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Subtract from this date. -
subDaysR
Subtract from this date.- Returns:
- This object.
-
subDays
public void subDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date. -
subDaysR
public CalendarAwareDate subDaysR(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date.- Returns:
- This object.
-
addUTCYears
public void addUTCYears(int p_iYears) Add to this date. -
addUTCYearsR
Add to this date.- Returns:
- This object.
-
subUTCYears
public void subUTCYears(int p_iYears) Subtract from this date. -
subUTCYearsR
Subtract from this date.- Returns:
- This object.
-
addUTCMonths
public void addUTCMonths(int p_iMonths) Add to this date. -
addUTCMonthsR
Add to this date.- Returns:
- This object.
-
subUTCMonths
public void subUTCMonths(int p_iMonths) Subtract from this date. -
subUTCMonthsR
Subtract from this date.- Returns:
- This object.
-
addUTCDays
public void addUTCDays(int p_iDays) Add to this date. -
addUTCDaysR
Add to this date.- Returns:
- This object.
-
addUTCDays
public void addUTCDays(int p_iDays, int p_iHours) Add to this date. -
addUTCDaysR
Add to this date.- Returns:
- This object.
-
addUTCDays
public void addUTCDays(int p_iDays, int p_iHours, int p_iMinutes) Add to this date. -
addUTCDaysR
Add to this date.- Returns:
- This object.
-
addUTCDays
public void addUTCDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Add to this date. -
addUTCDaysR
Add to this date.- Returns:
- This object.
-
addUTCDays
public void addUTCDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date. -
addUTCDaysR
public CalendarAwareDate addUTCDaysR(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Add to this date.- Returns:
- This object.
-
subUTCDays
public void subUTCDays(int p_iDays) Subtract from this date. -
subUTCDaysR
Subtract from this date.- Returns:
- This object.
-
subUTCDays
public void subUTCDays(int p_iDays, int p_iHours) Subtract from this date. -
subUTCDaysR
Subtract from this date.- Returns:
- This object.
-
subUTCDays
public void subUTCDays(int p_iDays, int p_iHours, int p_iMinutes) Subtract from this date. -
subUTCDaysR
Subtract from this date.- Returns:
- This object.
-
subUTCDays
public void subUTCDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds) Subtract from this date. -
subUTCDaysR
Subtract from this date.- Returns:
- This object.
-
subUTCDays
public void subUTCDays(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date. -
subUTCDaysR
public CalendarAwareDate subUTCDaysR(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMilliseconds) Subtract from this date.- Returns:
- This object.
-
modify
Modify this date according to the rules specified in thep_strRules
parameter in the given time zone.The rules consist of up to seven rules for each of the calendar fields
YEAR
,MONTH
,DAY_OF_MONTH
,HOUR_OF_DAY
,MINUTE
,SECOND
, andMILLISECOND
, in that order, and separated by commas. Each rule specifies either a positive or negative offset (e.g.-1
, or+1
), or an absolute value for the field (e.g.15
). Other than in the Java Calendar API, the month values are 1-based, i.e. 1 = January, 2 = February, ...Example:
+1,1,1,12,30,0,0
means the given date plus one year, the first of January, 12:30:00.0 on the 24-hour clock.- Parameters:
p_strRules
- The rules (must not benull
or empty).- Throws:
IllegalArgumentException
- Ifp_strRules
isnull
or empty.
-
modifyR
Same asmodify(String)
but returns this object.- Returns:
- This object.
-
modify
Modify this date according to the rules specified in thep_strRules
parameter in the given time zone.The rules consist of up to seven rules for each of the calendar fields
YEAR
,MONTH
,DAY_OF_MONTH
,HOUR_OF_DAY
,MINUTE
,SECOND
, andMILLISECOND
, in that order, and separated by commas. Each rule specifies either a positive or negative offset (e.g.-1
, or+1
), or an absolute value for the field (e.g.15
). Other than in the Java Calendar API, the month values are 1-based, i.e. 1 = January, 2 = February, ...Example:
+1,1,1,12,30,0,0
means the given date plus one year, the first of January, 12:30:00.0 on the 24-hour clock.- Parameters:
p_strRules
- The rules (must not benull
or empty).p_bClearMillis
-true
if the calendar's millisecond field should be set to zero if the rule does not specify the millisecond field, orfalse
otherwise.- Throws:
IllegalArgumentException
- Ifp_strRules
isnull
or empty.
-
modifyR
Same asmodify(String, boolean)
but returns this object.- Returns:
- This object.
-
modifyUTC
Modify this date according to the rules specified in thep_strRules
parameter in the UTC time zone.The rules consist of up to seven rules for each of the calendar fields
YEAR
,MONTH
,DAY_OF_MONTH
,HOUR_OF_DAY
,MINUTE
,SECOND
, andMILLISECOND
, in that order, and separated by commas. Each rule specifies either a positive or negative offset (e.g.-1
, or+1
), or an absolute value for the field (e.g.15
). Other than in the Java Calendar API, the month values are 1-based, i.e. 1 = January, 2 = February, ...Example:
+1,1,1,12,30,0,0
means the given date plus one year, the first of January, 12:30:00.0 on the 24-hour clock.- Parameters:
p_strRules
- The rules (must not benull
or empty).- Throws:
IllegalArgumentException
- Ifp_strRules
isnull
or empty.
-
modifyUTCR
Same asmodifyUTC(String)
but returns this object.- Returns:
- This object.
-
modifyUTC
Modify this date according to the rules specified in thep_strRules
parameter in the given time zone.The rules consist of up to seven rules for each of the calendar fields
YEAR
,MONTH
,DAY_OF_MONTH
,HOUR_OF_DAY
,MINUTE
,SECOND
, andMILLISECOND
, in that order, and separated by commas. Each rule specifies either a positive or negative offset (e.g.-1
, or+1
), or an absolute value for the field (e.g.15
). Other than in the Java Calendar API, the month values are 1-based, i.e. 1 = January, 2 = February, ...Example:
+1,1,1,12,30,0,0
means the given date plus one year, the first of January, 12:30:00.0 on the 24-hour clock.- Parameters:
p_strRules
- The rules (must not benull
or empty).p_bClearMillis
-true
if the calendar's millisecond field should be set to zero if the rule does not specify the millisecond field, orfalse
otherwise.- Throws:
IllegalArgumentException
- Ifp_strRules
isnull
or empty.
-
modifyUTCR
Same asmodifyUTC(String, boolean)
but returns this object.- Returns:
- This object.
-
toUTCString
Return a human-readable string that represents this date object, in UTC.See also ECMA-262, 15.9.5.42.
- Returns:
- A human-readable UTC date literal.
-
toJSON
Return string that represents this date object jsonified.The format is
"yyyy-MM-dd'T'HH:mm:ss'Z'"
.See also ECMA-262, 15.9.5.44.
- Returns:
- A JSON compatible date literal.
-
format
Format this date using the given simple date format in the given time zone.- Parameters:
p_strFormat
- The simple date format.- Returns:
- The formatted date.
-
format
Format this date using the given simple date format in the given time zone.- Parameters:
p_strFormat
- The simple date format.p_strLocaleId
- The ID (language tag) of the locale to be used.- Returns:
- The formatted date.
-
formatUTC
Format this date using the given simple date format in the UTC time zone.- Parameters:
p_strFormat
- The simple date format.- Returns:
- The formatted date.
-
formatUTC
Format this date using the given simple date format in the UTC time zone.- Parameters:
p_strFormat
- The simple date format.p_strLocaleId
- The ID (language tag) of the locale to be used.- Returns:
- The formatted date.
-
getType
Description copied from interface:IValueHolder
The type of data this value holder holds.- Specified by:
getType
in interfaceIValueHolder<Date>
- Returns:
IxDatatype.DATETIME
.
-
getValue
Description copied from interface:IValueHolder
Get the data that this value holder holds.Implementations MUST ensure that multiple calls to this method will return values that equal each other.
- Specified by:
getValue
in interfaceIValueHolder<Date>
- Returns:
- The data.
-
getRawValue
Description copied from interface:IValueHolder
Get the raw data that this value holder holds.- Specified by:
getRawValue
in interfaceIValueHolder<Date>
- Returns:
- The raw data.
-
hasValue
public boolean hasValue()Description copied from interface:IValueHolder
Check if this value holder currently holds data or not.- Specified by:
hasValue
in interfaceIValueHolder<Date>
- Returns:
true
if the data holder holds data, orfalse
otherwise.
-
getCanonicalLexicalRepresentation
Description copied from interface:IValueHolder
Get the canonical lexical representation of this value according to it's datatype.- Specified by:
getCanonicalLexicalRepresentation
in interfaceIValueHolder<Date>
- Returns:
- The canonical lexical representation of the current date.
- See Also:
-
asTime
Get the current time, i.e. the instance in time with its date set to zero 1970-01-01 in the UTC time zone.- Returns:
- The current time.
-
unwrap
-
getFullYear()
instead.