2005-04-10  Sven de Marothy  <[EMAIL PROTECTED]>

        * java/text/SimpleDateFormat.java:
        (formatWithAttribute): Pad year before truncating digits.

Index: java/text/SimpleDateFormat.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/text/SimpleDateFormat.java,v
retrieving revision 1.44
diff -u -r1.44 SimpleDateFormat.java
--- java/text/SimpleDateFormat.java	9 Mar 2005 22:29:20 -0000	1.44
+++ java/text/SimpleDateFormat.java	10 Apr 2005 19:07:49 -0000
@@ -680,7 +680,7 @@
 		buffer.setDefaultAttribute (DateFormat.Field.YEAR);
 		if (cf.getSize() == 2)
 		  {
-		    temp = String.valueOf (calendar.get (Calendar.YEAR));
+		    temp = "00"+String.valueOf (calendar.get (Calendar.YEAR));
 		    buffer.append (temp.substring (temp.length() - 2));
 		  }
 		else
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to