You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/03/03 23:31:29 UTC

svn commit: r1573786 - in /commons/proper/lang/trunk/src: changes/changes.xml main/java/org/apache/commons/lang3/time/DurationFormatUtils.java

Author: sebb
Date: Mon Mar  3 22:31:28 2014
New Revision: 1573786

URL: http://svn.apache.org/r1573786
Log:
LANG-983 DurationFormatUtils does not describe format string fully

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java

Modified: commons/proper/lang/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/changes/changes.xml?rev=1573786&r1=1573785&r2=1573786&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/lang/trunk/src/changes/changes.xml [utf-8] Mon Mar  3 22:31:28 2014
@@ -22,6 +22,7 @@
   <body>
 
   <release version="3.4" date="TBA" description="TBA">
+    <action issue="LANG-983" type="fix" dev="sebb">DurationFormatUtils does not describe format string fully</action>
     <action issue="LANG-981" type="fix" dev="sebb">DurationFormatUtils#lexx does not detect unmatched quote char</action>
     <action issue="LANG-984" type="fix" dev="sebb">DurationFormatUtils does not handle large durations correctly</action>
     <action issue="LANG-982" type="fix" dev="sebb">DurationFormatUtils.formatDuration(61999, "s.SSSS") - ms field size should be 4 digits</action>

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java?rev=1573786&r1=1573785&r2=1573786&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java Mon Mar  3 22:31:28 2014
@@ -36,8 +36,14 @@ import org.apache.commons.lang3.StringUt
  *  <tr><td>m</td><td>minutes</td></tr>
  *  <tr><td>s</td><td>seconds</td></tr>
  *  <tr><td>S</td><td>milliseconds</td></tr>
+ *  <tr><td>'text'</td><td>arbitrary text content</td></tr>
  * </table>
  *
+ * <b>Note: It's not currently possible to include a single-quote in a format.</b>
+ * <br/>
+ * Token values are printed using decimal digits.
+ * A token character can be repeated to ensure that the field occupies a certain minimum
+ * size. Values will be left-padded with 0 unless padding is disabled in the method invocation.
  * @since 2.1
  * @version $Id$
  */
@@ -92,8 +98,7 @@ public class DurationFormatUtils {
     }
 
     /**
-     * <p>Formats the time gap as a string, using the specified format, and padding with zeros and 
-     * using the default timezone.</p>
+     * <p>Formats the time gap as a string, using the specified format, and padding with zeros.</p>
      * 
      * <p>This method formats durations using the days and lower fields of the
      * format pattern. Months and larger are not used.</p>