LANG-983 DurationFormatUtils does not describe format string fully

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1573786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2014-03-03 22:31:28 +00:00
parent aadd8e172e
commit 1a97c7efe1
2 changed files with 8 additions and 2 deletions

View File

@ -22,6 +22,7 @@
<body> <body>
<release version="3.4" date="TBA" description="TBA"> <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-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-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> <action issue="LANG-982" type="fix" dev="sebb">DurationFormatUtils.formatDuration(61999, "s.SSSS") - ms field size should be 4 digits</action>

View File

@ -36,8 +36,14 @@ import org.apache.commons.lang3.StringUtils;
* <tr><td>m</td><td>minutes</td></tr> * <tr><td>m</td><td>minutes</td></tr>
* <tr><td>s</td><td>seconds</td></tr> * <tr><td>s</td><td>seconds</td></tr>
* <tr><td>S</td><td>milliseconds</td></tr> * <tr><td>S</td><td>milliseconds</td></tr>
* <tr><td>'text'</td><td>arbitrary text content</td></tr>
* </table> * </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 * @since 2.1
* @version $Id$ * @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 * <p>Formats the time gap as a string, using the specified format, and padding with zeros.</p>
* using the default timezone.</p>
* *
* <p>This method formats durations using the days and lower fields of the * <p>This method formats durations using the days and lower fields of the
* format pattern. Months and larger are not used.</p> * format pattern. Months and larger are not used.</p>