summaryrefslogtreecommitdiff
path: root/java/text/SimpleDateFormat.java
diff options
context:
space:
mode:
authorSven de Marothy <sven@physto.se>2005-04-10 19:13:19 +0000
committerSven de Marothy <sven@physto.se>2005-04-10 19:13:19 +0000
commitdfd968b0a58b59a6c7790f31fbe91caa4ee8c5a6 (patch)
tree17e979c9a0de349ef13f40ce3f4f929831e47533 /java/text/SimpleDateFormat.java
parent66e4837660487d682f1cdd4b3c5a943bb801aec6 (diff)
downloadclasspath-dfd968b0a58b59a6c7790f31fbe91caa4ee8c5a6.tar.gz
2005-04-10 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java: (formatWithAttribute): Pad year before truncating digits.
Diffstat (limited to 'java/text/SimpleDateFormat.java')
-rw-r--r--java/text/SimpleDateFormat.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/text/SimpleDateFormat.java b/java/text/SimpleDateFormat.java
index 190b4d624..06275b628 100644
--- a/java/text/SimpleDateFormat.java
+++ b/java/text/SimpleDateFormat.java
@@ -680,7 +680,7 @@ public class SimpleDateFormat extends DateFormat
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