/[classpath]/classpath/java/text/SimpleDateFormat.java
ViewVC logotype

Diff of /classpath/java/text/SimpleDateFormat.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28.2.10 by gnu_andrew, Sat Feb 19 10:50:42 2005 UTC revision 1.28.2.11 by gnu_andrew, Mon Feb 21 02:50:40 2005 UTC
# Line 430  public class SimpleDateFormat extends Da Line 430  public class SimpleDateFormat extends Da
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)
# Line 439  public class SimpleDateFormat extends Da Line 439  public class SimpleDateFormat extends Da
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;
# Line 1017  public class SimpleDateFormat extends Da Line 1019  public class SimpleDateFormat extends Da
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;

Legend:
Removed from v.1.28.2.10  
changed lines
  Added in v.1.28.2.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26