DateTimeRule is a class representing a time in a year by
a rule specified by month, day of month, day of week and
time in the day.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final int | |
| private final int | |
| public static final int | DOM
Date rule type defined by exact day of month. |
| public static final int | DOW
Date rule type defined by day of week in month. |
| public static final int | DOW_GEQ_DOM
Date rule type defined by first day of week on or after exact day of month. |
| public static final int | DOW_LEQ_DOM
Date rule type defined by last day of week on or before exact day of month. |
| private static final String[] | |
| private final int | |
| private static final String[] | |
| private final int | |
| private static final long | |
| public static final int | STANDARD_TIME
Time rule type for local standard time. |
| private final int | |
| public static final int | UTC_TIME
Time rule type for coordinated universal time. |
| public static final int | WALL_TIME
Time rule type for local wall time. |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | DateTimeRule(int
The rule month, for example, month, int Calendar.JANUARYThe day of month, 1-based. dayOfMonth, int The milliseconds in the rule date. millisInDay, int The time type, timeType)WALL_TIME or STANDARD_TIME
or UTC_TIME.Constructs a |
| public | DateTimeRule(int
The rule month, for example, month, int Calendar.JANUARY.The ordinal number of the day of week. Negative number
may be used for specifying a rule date counted from the
end of the rule month. weekInMonth, int The day of week, for example, dayOfWeek, int Calendar.SUNDAY.The milliseconds in the rule date. millisInDay, int The time type, timeType)WALL_TIME or STANDARD_TIME
or UTC_TIME.Constructs a |
| public | DateTimeRule(int
The rule month, for example, month, int Calendar.JANUARYThe day of month, 1-based. dayOfMonth, int The day of week, for example, dayOfWeek, boolean Calendar.SUNDAY.true if the rule date is on or after the day of month. after, int The milliseconds in the rule date. millisInDay, int The time type, timeType)WALL_TIME or STANDARD_TIME
or UTC_TIME.Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public int | |
| public int | Returns: The time in the rule day in milliseconds.Gets the rule time in the rule day. |
| public int | |
| public int | Returns: The rule day of week ordinal number in the month.Gets the rule day of week ordinal number in the month. |
| public int | Returns: The time rule type, eitherWALL_TIME or STANDARD_TIME
or UTC_TIME.Gets the time rule type |
| public String | toString()
Overrides java. String representation of this DateTimeRule object.
|
| dateRuleType | back to summary |
|---|---|
| private final int dateRuleType | |
| dayOfMonth | back to summary |
|---|---|
| private final int dayOfMonth | |
| dayOfWeek | back to summary |
|---|---|
| private final int dayOfWeek | |
| DOM | back to summary |
|---|---|
| public static final int DOM Date rule type defined by exact day of month. For example, March 14.
| |
| DOW | back to summary |
|---|---|
| public static final int DOW Date rule type defined by day of week in month. For example, 2nd Sunday in March.
| |
| DOW_GEQ_DOM | back to summary |
|---|---|
| public static final int DOW_GEQ_DOM Date rule type defined by first day of week on or after exact day of month. For example, 1st Monday on or after March 15.
| |
| DOW_LEQ_DOM | back to summary |
|---|---|
| public static final int DOW_LEQ_DOM Date rule type defined by last day of week on or before exact day of month. For example, last Saturday on or before March 15.
| |
| DOWSTR | back to summary |
|---|---|
| private static final String[] DOWSTR | |
| millisInDay | back to summary |
|---|---|
| private final int millisInDay | |
| MONSTR | back to summary |
|---|---|
| private static final String[] MONSTR | |
| month | back to summary |
|---|---|
| private final int month | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| STANDARD_TIME | back to summary |
|---|---|
| public static final int STANDARD_TIME Time rule type for local standard time.
| |
| timeRuleType | back to summary |
|---|---|
| private final int timeRuleType | |
| UTC_TIME | back to summary |
|---|---|
| public static final int UTC_TIME Time rule type for coordinated universal time.
| |
| WALL_TIME | back to summary |
|---|---|
| public static final int WALL_TIME Time rule type for local wall time.
| |
| weekInMonth | back to summary |
|---|---|
| private final int weekInMonth | |
| DateTimeRule | back to summary |
|---|---|
| public DateTimeRule(int month, int dayOfMonth, int millisInDay, int timeType) Constructs a
| |
| DateTimeRule | back to summary |
|---|---|
| public DateTimeRule(int month, int weekInMonth, int dayOfWeek, int millisInDay, int timeType) Constructs a
| |
| DateTimeRule | back to summary |
|---|---|
| public DateTimeRule(int month, int dayOfMonth, int dayOfWeek, boolean after, int millisInDay, int timeType) Constructs a
| |
| getDateRuleType | back to summary |
|---|---|
| public int getDateRuleType() Gets the date rule type, such as
| |
| getRuleDayOfMonth | back to summary |
|---|---|
| public int getRuleDayOfMonth() Gets the rule day of month. When the date rule type
is
| |
| getRuleDayOfWeek | back to summary |
|---|---|
| public int getRuleDayOfWeek() Gets the rule day of week. When the date rule type
is
| |
| getRuleMillisInDay | back to summary |
|---|---|
| public int getRuleMillisInDay() Gets the rule time in the rule day.
| |
| getRuleMonth | back to summary |
|---|---|
| public int getRuleMonth() Gets the rule month.
| |
| getRuleWeekInMonth | back to summary |
|---|---|
| public int getRuleWeekInMonth() Gets the rule day of week ordinal number in the month.
When the date rule type is not
| |
| getTimeRuleType | back to summary |
|---|---|
| public int getTimeRuleType() Gets the time rule type
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a
| |