java::util::DSTRule Class Reference

Inheritance diagram for java::util::DSTRule:

Inheritance graph
java::lang::Object
[legend]
Collaboration diagram for java::util::DSTRule:

Collaboration graph
java::lang::Object
[legend]

List of all members.


Detailed Description

DSTRult is a class represents daylight savings time rule.

Version:
1.38 01/19/00
Author:
Yuh-Jye Chang

Public Types

enum  TIME { WALL_TIME = 0, STANDARD_TIME, UTC_TIME }

Public Member Functions

 DSTRule ()
 DSTRule (jint _month, jint _day, jint _dayOfWeek, jint _time, jint _timeMode=WALL_TIME)
 Construct a daylight savings rule with the time to start or end the daylight time.
virtual jint hashCode () const
 Override hashCode.
virtual jboolean equals (const Object &obj) const
 Compares the equality of two DSTRule objects.
virtual jboolean equals (const DSTRule &obj) const
 Compares the equality of two DSTRule objects.
jint compareTo (jint month, jint monthLen, jint prevMonthLen, jint dayOfMonth, jint dayOfWeek, jint millis, jint millisDelta) const
 Compare a given date in the year to a rule.
virtual jboolean isEmpty () const
 Check if this rule is not in effect.
virtual void decode ()

Public Attributes

jint month
 The month in which daylight savings time starts.
jint day
 The day in which daylight savings time starts.
jint dayOfWeek
 The day of the week on which daylight savings time starts.
jint time
 The time in milliseconds after midnight at which daylight savings time starts.
jint timeMode
 The format of startTime, either WALL_TIME, STANDARD_TIME, or UTC_TIME.
jint mode
 Variables specifying the mode of the start rule.
 REGISTER_MEMBERS

Member Enumeration Documentation

enum java::util::DSTRule::TIME

Enumerator:
WALL_TIME  Constant for a rule specified as wall time.

Wall time is standard time for the onset rule, and daylight time for the end rule. Most rules are specified as wall time.

STANDARD_TIME  Constant for a rule specified as standard time.
UTC_TIME  Constant for a rule specified as UTC.

EU rules are specified as UTC time.


Constructor & Destructor Documentation

java::util::DSTRule::DSTRule (  ) 

java::util::DSTRule::DSTRule ( jint  _month,
jint  _day,
jint  _dayOfWeek,
jint  _time,
jint  _timeMode = WALL_TIME 
)

Construct a daylight savings rule with the time to start or end the daylight time.

Parameters:
month The daylight savings starting month. Month is 0-based. eg, 0 for January.
day The daylight savings starting day-of-week-in-month. Please see the member description for an example.
dayOfWeek The daylight savings starting day-of-week. Please see the member description for an example.
time The daylight savings starting time in local wall time, which is standard time in this case. Please see the member description for an example.


Member Function Documentation

virtual jint java::util::DSTRule::hashCode (  )  const [virtual]

Override hashCode.

Generates the hash code for the DSTRule object

Reimplemented from java::lang::Object.

virtual jboolean java::util::DSTRule::equals ( const Object obj  )  const [virtual]

Compares the equality of two DSTRule objects.

Parameters:
obj The DSTRule object to be compared with.
Returns:
True if the given obj is the same as this DSTRule object; false otherwise.

Reimplemented from java::lang::Object.

virtual jboolean java::util::DSTRule::equals ( const DSTRule obj  )  const [virtual]

Compares the equality of two DSTRule objects.

Parameters:
obj The DSTRule object to be compared with.
Returns:
True if the given obj is the same as this DSTRule object; false otherwise.

jint java::util::DSTRule::compareTo ( jint  month,
jint  monthLen,
jint  prevMonthLen,
jint  dayOfMonth,
jint  dayOfWeek,
jint  millis,
jint  millisDelta 
) const

Compare a given date in the year to a rule.

Return 1, 0, or -1, depending on whether the date is after, equal to, or before the rule date. The millis are compared directly against the ruleMillis, so any standard-daylight adjustments must be handled by the caller.

Returns:
1 if the date is after the rule date, -1 if the date is before the rule date, or 0 if the date is equal to the rule date.

virtual jboolean java::util::DSTRule::isEmpty (  )  const [virtual]

Check if this rule is not in effect.

virtual void java::util::DSTRule::decode (  )  [virtual]


Member Data Documentation

jint java::util::DSTRule::month

The month in which daylight savings time starts.

This value must be between Calendar.ANUARY and Calendar.DECEMBER inclusive. This value must not equal endMonth.

If useDaylight is false, this value is ignored.

jint java::util::DSTRule::day

The day in which daylight savings time starts.

This field has two possible interpretations:

startMode == DOW_IN_MONTH
startDay indicates the day of the month of startMonth on which daylight savings time starts, from 1 to 28, 30, or 31, depending on the startMonth.
startMode != DOW_IN_MONTH
startDay indicates which startDayOfWeek in th month startMonth daylight savings time starts on. For example, a value of +1 and a startDayOfWeek of Calendar.SUNDAY indicates the first Sunday of startMonth. Likewise, +2 would indicate the second Sunday, and -1 the last Sunday. A value of 0 is illegal.

If useDaylight is false, this value is ignored.

jint java::util::DSTRule::dayOfWeek

The day of the week on which daylight savings time starts.

This value must be between Calendar.SUNDAY and Calendar.SATURDAY inclusive.

If useDaylight is false or startMode == DAY_OF_MONTH, this value is ignored.

jint java::util::DSTRule::time

The time in milliseconds after midnight at which daylight savings time starts.

This value is expressed as wall time, standard time, or UTC time, depending on the setting of startTimeMode.

If useDaylight is false, this value is ignored.

jint java::util::DSTRule::timeMode

The format of startTime, either WALL_TIME, STANDARD_TIME, or UTC_TIME.

Since:
DK 1.3

jint java::util::DSTRule::mode

Variables specifying the mode of the start rule.

Takes the following values:

DOM_MODE
Exact day of week; e.g., March 1.
DOW_IN_MONTH_MODE
Day of week in month; e.g., last Sunday in March.
DOW_GE_DOM_MODE
Day of week after day of month; e.g., Sunday on or after March 15.
DOW_LE_DOM_MODE
Day of week before day of month; e.g., Sunday on or before March 15.
The setting of this field affects the interpretation of the startDay field.

If useDaylight is false, this value is ignored.

Since:
DK1.1.4

java::util::DSTRule::REGISTER_MEMBERS

Reimplemented from java::lang::Object.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:51 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3