A minor thing, but SimpleDateFormat doesn't handle the hours in HH:mm
correctly; single-digit hours should have a '0' prepended.

The attached patch fixes this.

-Peter
http://armedbear.org
Index: SimpleDateFormat.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/text/SimpleDateFormat.java,v
retrieving revision 1.11
diff -u -r1.11 SimpleDateFormat.java
--- SimpleDateFormat.java       1999/05/16 23:38:00     1.11
+++ SimpleDateFormat.java       1999/06/26 16:09:35
@@ -165,6 +165,8 @@
                        break;
                case 'H':
                        val = calendar.get(Calendar.HOUR_OF_DAY);
+                       if ( (plen > 1) && (val < 10) )
+                               buf.append('0');
                        buf.append(val);
                        if (pos.field == HOUR_OF_DAY0_FIELD) {
                                pos.begin = cpos;

Reply via email to