430 |
* |
* |
431 |
* @param pattern the non-localized pattern to use. |
* @param pattern the non-localized pattern to use. |
432 |
* @param formatData the formatting symbols to use. |
* @param formatData the formatting symbols to use. |
433 |
* @throws NullPointerException if the pattern is null. |
* @throws NullPointerException if the pattern or formatData is null. |
434 |
* @throws IllegalArgumentException if the pattern is invalid. |
* @throws IllegalArgumentException if the pattern is invalid. |
435 |
*/ |
*/ |
436 |
public SimpleDateFormat(String pattern, DateFormatSymbols formatData) |
public SimpleDateFormat(String pattern, DateFormatSymbols formatData) |
439 |
calendar = new GregorianCalendar(); |
calendar = new GregorianCalendar(); |
440 |
computeCenturyStart (); |
computeCenturyStart (); |
441 |
tokens = new ArrayList(); |
tokens = new ArrayList(); |
442 |
|
if (formatData == null) |
443 |
|
throw new NullPointerException("formatData"); |
444 |
this.formatData = formatData; |
this.formatData = formatData; |
445 |
compileFormat(pattern); |
compileFormat(pattern); |
446 |
this.pattern = pattern; |
this.pattern = pattern; |
1019 |
found_zone = true; |
found_zone = true; |
1020 |
saw_timezone = true; |
saw_timezone = true; |
1021 |
TimeZone tz = TimeZone.getTimeZone (strings[0]); |
TimeZone tz = TimeZone.getTimeZone (strings[0]); |
1022 |
calendar.set (Calendar.DST_OFFSET, tz.getDSTSavings()); |
// Check if it's a DST zone or ordinary |
1023 |
|
if(k == 3 || k == 4) |
1024 |
|
calendar.set (Calendar.DST_OFFSET, tz.getDSTSavings()); |
1025 |
|
else |
1026 |
|
calendar.set (Calendar.DST_OFFSET, 0); |
1027 |
offset = tz.getRawOffset (); |
offset = tz.getRawOffset (); |
1028 |
pos.setIndex(index + strings[k].length()); |
pos.setIndex(index + strings[k].length()); |
1029 |
break; |
break; |