70 |
/** |
/** |
71 |
* The daylight savings offset. This is a positive offset in |
* The daylight savings offset. This is a positive offset in |
72 |
* milliseconds with respect to standard time. Typically this |
* milliseconds with respect to standard time. Typically this |
73 |
* is one hour, but for some time zones this may be half an our. |
* is one hour, but for some time zones this may be half an hour. |
74 |
* @serial |
* @serial |
75 |
* @since JDK1.1.4 |
* @since JDK1.1.4 |
76 |
*/ |
*/ |
430 |
*/ |
*/ |
431 |
private int checkRule(int month, int day, int dayOfWeek) |
private int checkRule(int month, int day, int dayOfWeek) |
432 |
{ |
{ |
433 |
|
if (month < 0 || month > 11) |
434 |
|
throw new IllegalArgumentException("month out of range"); |
435 |
int daysInMonth = getDaysInMonth(month, 1); |
int daysInMonth = getDaysInMonth(month, 1); |
436 |
if (dayOfWeek == 0) |
if (dayOfWeek == 0) |
437 |
{ |
{ |
591 |
* |
* |
592 |
* Note that this API isn't incredibly well specified. It appears that the |
* Note that this API isn't incredibly well specified. It appears that the |
593 |
* after flag must override the parameters, since normally, the day and |
* after flag must override the parameters, since normally, the day and |
594 |
* dayofweek can select this. I.e., if day < 0 and dayOfWeek < 0, on or |
* dayofweek can select this. I.e., if day < 0 and dayOfWeek < 0, on or |
595 |
* before mode is chosen. But if after == true, this implementation |
* before mode is chosen. But if after == true, this implementation |
596 |
* overrides the signs of the other arguments. And if dayOfWeek == 0, it |
* overrides the signs of the other arguments. And if dayOfWeek == 0, it |
597 |
* falls back to the behavior in the other APIs. I guess this should be |
* falls back to the behavior in the other APIs. I guess this should be |
695 |
boolean afterStart = !isBefore(year, month, day, dayOfWeek, millis, |
boolean afterStart = !isBefore(year, month, day, dayOfWeek, millis, |
696 |
startMode, startMonth, |
startMode, startMonth, |
697 |
startDay, startDayOfWeek, startTime); |
startDay, startDayOfWeek, startTime); |
698 |
boolean beforeEnd = isBefore(year, month, day, dayOfWeek, millis, |
boolean beforeEnd = isBefore(year, month, day, dayOfWeek, |
699 |
|
millis + dstSavings, |
700 |
endMode, endMonth, |
endMode, endMonth, |
701 |
endDay, endDayOfWeek, endTime); |
endDay, endDayOfWeek, endTime); |
702 |
|
|