207 * @param endDayOfWeek The daylight saving time ending day-of-week. |
207 * @param endDayOfWeek The daylight saving time ending day-of-week. |
208 * See the class description for the special cases of this parameter. |
208 * See the class description for the special cases of this parameter. |
209 * @param endTime The daylight saving ending time in local wall clock time, |
209 * @param endTime The daylight saving ending time in local wall clock time, |
210 * (in milliseconds within the day) which is local daylight |
210 * (in milliseconds within the day) which is local daylight |
211 * time in this case. |
211 * time in this case. |
212 * @exception IllegalArgumentException if the month, day, dayOfWeek, or time |
212 * @throws IllegalArgumentException if the month, day, dayOfWeek, or time |
213 * parameters are out of range for the start or end rule |
213 * parameters are out of range for the start or end rule |
214 */ |
214 */ |
215 public SimpleTimeZone(int rawOffset, String ID, |
215 public SimpleTimeZone(int rawOffset, String ID, |
216 int startMonth, int startDay, int startDayOfWeek, int startTime, |
216 int startMonth, int startDay, int startDayOfWeek, int startTime, |
217 int endMonth, int endDay, int endDayOfWeek, int endTime) |
217 int endMonth, int endDay, int endDayOfWeek, int endTime) |
264 * See the class description for the special cases of this parameter. |
264 * See the class description for the special cases of this parameter. |
265 * @param endTime The daylight saving ending time in local wall clock time, |
265 * @param endTime The daylight saving ending time in local wall clock time, |
266 * which is local daylight time in this case. |
266 * which is local daylight time in this case. |
267 * @param dstSavings The amount of time in milliseconds saved during |
267 * @param dstSavings The amount of time in milliseconds saved during |
268 * daylight saving time. |
268 * daylight saving time. |
269 * @exception IllegalArgumentException if the month, day, dayOfWeek, or time |
269 * @throws IllegalArgumentException if the month, day, dayOfWeek, or time |
270 * parameters are out of range for the start or end rule |
270 * parameters are out of range for the start or end rule |
271 * @since 1.2 |
271 * @since 1.2 |
272 */ |
272 */ |
273 public SimpleTimeZone(int rawOffset, String ID, |
273 public SimpleTimeZone(int rawOffset, String ID, |
274 int startMonth, int startDay, int startDayOfWeek, int startTime, |
274 int startMonth, int startDay, int startDayOfWeek, int startTime, |
314 * specified by <code>endTimeMode</code>. |
314 * specified by <code>endTimeMode</code>. |
315 * @param endTimeMode The mode of the end time specified by endTime |
315 * @param endTimeMode The mode of the end time specified by endTime |
316 * @param dstSavings The amount of time in milliseconds saved during |
316 * @param dstSavings The amount of time in milliseconds saved during |
317 * daylight saving time. |
317 * daylight saving time. |
318 * |
318 * |
319 * @exception IllegalArgumentException if the month, day, dayOfWeek, time more, or |
319 * @throws IllegalArgumentException if the month, day, dayOfWeek, time more, or |
320 * time parameters are out of range for the start or end rule, or if a time mode |
320 * time parameters are out of range for the start or end rule, or if a time mode |
321 * value is invalid. |
321 * value is invalid. |
322 * |
322 * |
323 * @see #WALL_TIME |
323 * @see #WALL_TIME |
324 * @see #STANDARD_TIME |
324 * @see #STANDARD_TIME |
378 * See the class description for the special cases of this parameter. |
378 * See the class description for the special cases of this parameter. |
379 * @param startDayOfWeek The daylight saving time starting day-of-week. |
379 * @param startDayOfWeek The daylight saving time starting day-of-week. |
380 * See the class description for the special cases of this parameter. |
380 * See the class description for the special cases of this parameter. |
381 * @param startTime The daylight saving time starting time in local wall clock |
381 * @param startTime The daylight saving time starting time in local wall clock |
382 * time, which is local standard time in this case. |
382 * time, which is local standard time in this case. |
383 * @exception IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>, |
383 * @throws IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>, |
384 * <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range |
384 * <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range |
385 */ |
385 */ |
386 public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime) |
386 public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime) |
387 { |
387 { |
388 this.startMonth = startMonth; |
388 this.startMonth = startMonth; |
404 * value (0-based. e.g., 0 for January). |
404 * value (0-based. e.g., 0 for January). |
405 * @param startDay The day of the month on which the daylight saving time starts. |
405 * @param startDay The day of the month on which the daylight saving time starts. |
406 * @param startTime The daylight saving time starting time in local wall clock |
406 * @param startTime The daylight saving time starting time in local wall clock |
407 * time, which is local standard time in this case. |
407 * time, which is local standard time in this case. |
408 * See the class description for the special cases of this parameter. |
408 * See the class description for the special cases of this parameter. |
409 * @exception IllegalArgumentException if the <code>startMonth</code>, |
409 * @throws IllegalArgumentException if the <code>startMonth</code>, |
410 * <code>startDayOfMonth</code>, or <code>startTime</code> parameters are out of range |
410 * <code>startDayOfMonth</code>, or <code>startTime</code> parameters are out of range |
411 * @since 1.2 |
411 * @since 1.2 |
412 */ |
412 */ |
413 public void setStartRule(int startMonth, int startDay, int startTime) { |
413 public void setStartRule(int startMonth, int startDay, int startTime) { |
414 setStartRule(startMonth, startDay, 0, startTime); |
414 setStartRule(startMonth, startDay, 0, startTime); |
427 * time, which is local standard time in this case. |
427 * time, which is local standard time in this case. |
428 * @param after If true, this rule selects the first <code>dayOfWeek</code> on or |
428 * @param after If true, this rule selects the first <code>dayOfWeek</code> on or |
429 * <em>after</em> <code>dayOfMonth</code>. If false, this rule |
429 * <em>after</em> <code>dayOfMonth</code>. If false, this rule |
430 * selects the last <code>dayOfWeek</code> on or <em>before</em> |
430 * selects the last <code>dayOfWeek</code> on or <em>before</em> |
431 * <code>dayOfMonth</code>. |
431 * <code>dayOfMonth</code>. |
432 * @exception IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>, |
432 * @throws IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>, |
433 * <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range |
433 * <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range |
434 * @since 1.2 |
434 * @since 1.2 |
435 */ |
435 */ |
436 public void setStartRule(int startMonth, int startDay, int startDayOfWeek, |
436 public void setStartRule(int startMonth, int startDay, int startDayOfWeek, |
437 int startTime, boolean after) |
437 int startTime, boolean after) |
458 * @param endDayOfWeek The daylight saving time ending day-of-week. |
458 * @param endDayOfWeek The daylight saving time ending day-of-week. |
459 * See the class description for the special cases of this parameter. |
459 * See the class description for the special cases of this parameter. |
460 * @param endTime The daylight saving ending time in local wall clock time, |
460 * @param endTime The daylight saving ending time in local wall clock time, |
461 * (in milliseconds within the day) which is local daylight |
461 * (in milliseconds within the day) which is local daylight |
462 * time in this case. |
462 * time in this case. |
463 * @exception IllegalArgumentException if the <code>endMonth</code>, <code>endDay</code>, |
463 * @throws IllegalArgumentException if the <code>endMonth</code>, <code>endDay</code>, |
464 * <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range |
464 * <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range |
465 */ |
465 */ |
466 public void setEndRule(int endMonth, int endDay, int endDayOfWeek, |
466 public void setEndRule(int endMonth, int endDay, int endDayOfWeek, |
467 int endTime) |
467 int endTime) |
468 { |
468 { |
485 * value (0-based. e.g., 9 for October). |
485 * value (0-based. e.g., 9 for October). |
486 * @param endDay The day of the month on which the daylight saving time ends. |
486 * @param endDay The day of the month on which the daylight saving time ends. |
487 * @param endTime The daylight saving ending time in local wall clock time, |
487 * @param endTime The daylight saving ending time in local wall clock time, |
488 * (in milliseconds within the day) which is local daylight |
488 * (in milliseconds within the day) which is local daylight |
489 * time in this case. |
489 * time in this case. |
490 * @exception IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>, |
490 * @throws IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>, |
491 * or <code>endTime</code> parameters are out of range |
491 * or <code>endTime</code> parameters are out of range |
492 * @since 1.2 |
492 * @since 1.2 |
493 */ |
493 */ |
494 public void setEndRule(int endMonth, int endDay, int endTime) |
494 public void setEndRule(int endMonth, int endDay, int endTime) |
495 { |
495 { |
510 * time in this case. |
510 * time in this case. |
511 * @param after If true, this rule selects the first <code>endDayOfWeek</code> on |
511 * @param after If true, this rule selects the first <code>endDayOfWeek</code> on |
512 * or <em>after</em> <code>endDay</code>. If false, this rule |
512 * or <em>after</em> <code>endDay</code>. If false, this rule |
513 * selects the last <code>endDayOfWeek</code> on or before |
513 * selects the last <code>endDayOfWeek</code> on or before |
514 * <code>endDay</code> of the month. |
514 * <code>endDay</code> of the month. |
515 * @exception IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>, |
515 * @throws IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>, |
516 * <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range |
516 * <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range |
517 * @since 1.2 |
517 * @since 1.2 |
518 */ |
518 */ |
519 public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) |
519 public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) |
520 { |
520 { |
595 * 0 for January. |
595 * 0 for January. |
596 * @param day The day-in-month of the given date. |
596 * @param day The day-in-month of the given date. |
597 * @param dayOfWeek The day-of-week of the given date. |
597 * @param dayOfWeek The day-of-week of the given date. |
598 * @param millis The milliseconds in day in <em>standard</em> local time. |
598 * @param millis The milliseconds in day in <em>standard</em> local time. |
599 * @return The milliseconds to add to UTC to get local time. |
599 * @return The milliseconds to add to UTC to get local time. |
600 * @exception IllegalArgumentException the <code>era</code>, |
600 * @throws IllegalArgumentException the <code>era</code>, |
601 * <code>month</code>, <code>day</code>, <code>dayOfWeek</code>, |
601 * <code>month</code>, <code>day</code>, <code>dayOfWeek</code>, |
602 * or <code>millis</code> parameters are out of range |
602 * or <code>millis</code> parameters are out of range |
603 */ |
603 */ |
604 public int getOffset(int era, int year, int month, int day, int dayOfWeek, |
604 public int getOffset(int era, int year, int month, int day, int dayOfWeek, |
605 int millis) |
605 int millis) |