/[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.7 by gnu_andrew, Wed Feb 2 01:56:01 2005 UTC revision 1.28.2.8 by gnu_andrew, Sun Feb 6 02:24:18 2005 UTC
# Line 1096  public class SimpleDateFormat extends Da Line 1096  public class SimpleDateFormat extends Da
1096                  // exactly 2 digits.                  // exactly 2 digits.
1097                  int digit_count = pos.getIndex() - index;                  int digit_count = pos.getIndex() - index;
1098                  if (digit_count == 2)                  if (digit_count == 2)
1099                    is2DigitYear = true;                    {
1100                        is2DigitYear = true;
1101                        value += defaultCentury;
1102                      }
1103                }                }
1104                            
1105              // Assign the value and move on.              // Assign the value and move on.
# Line 1107  public class SimpleDateFormat extends Da Line 1110  public class SimpleDateFormat extends Da
1110            {            {
1111              // Apply the 80-20 heuristic to dermine the full year based on              // Apply the 80-20 heuristic to dermine the full year based on
1112              // defaultCenturyStart.              // defaultCenturyStart.
1113              int year = defaultCentury + calendar.get(Calendar.YEAR);              int year = calendar.get(Calendar.YEAR);
             calendar.set(Calendar.YEAR, year);  
1114              if (calendar.getTime().compareTo(defaultCenturyStart) < 0)              if (calendar.getTime().compareTo(defaultCenturyStart) < 0)
1115                calendar.set(Calendar.YEAR, year + 100);                      calendar.set(Calendar.YEAR, year + 100);      
1116            }            }

Legend:
Removed from v.1.28.2.7  
changed lines
  Added in v.1.28.2.8

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