[Webfunds-commits] java/webfunds/ricardian Support.java
Jeroen C. van Gelderen
gelderen@cypherpunks.ai
Tue, 27 Mar 2001 20:13:45 -0400 (AST)
gelderen 01/03/27 20:13:45
Modified: webfunds/ricardian Support.java
Log:
Fix decimal format strings to ensure a leading zero is always present.
(Use '0' instead of '#'.)
Revision Changes Path
1.8 +5 -4 java/webfunds/ricardian/Support.java
Index: Support.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/Support.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Support.java 2000/10/07 18:13:23 1.7
+++ Support.java 2001/03/28 00:13:45 1.8
@@ -1,5 +1,5 @@
/*
- * $Id: Support.java,v 1.7 2000/10/07 18:13:23 iang Exp $
+ * $Id: Support.java,v 1.8 2001/03/28 00:13:45 gelderen Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -285,11 +285,12 @@
public static String power2DecimalFormatPattern(int p)
{
if (p == 0)
- return "#";
+ return "0";
+
if (p < 0)
- return "#" + repeats(p, "#");
+ return "0" + repeats(p, "#");
else // if (p > 0)
- return "#." + repeats(p, "0");
+ return "0." + repeats(p, "0");
}