You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2006/12/13 08:12:38 UTC
svn commit: r486525 - in /jakarta/commons/proper/lang/trunk/src:
java/org/apache/commons/lang/time/DurationFormatUtils.java
test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
Author: bayard
Date: Tue Dec 12 23:12:38 2006
New Revision: 486525
URL: http://svn.apache.org/viewvc?view=rev&rev=486525
Log:
Let a few tab characters slip in - Eclipse wasn't configured yet. Replacing with spaces.
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java?view=diff&rev=486525&r1=486524&r2=486525
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java Tue Dec 12 23:12:38 2006
@@ -355,10 +355,10 @@
months += 12 * years;
years = 0;
} else {
- while ( (start.get(Calendar.YEAR) != end.get(Calendar.YEAR))) {
+ while ( (start.get(Calendar.YEAR) != end.get(Calendar.YEAR))) {
days += start.getActualMaximum(Calendar.DAY_OF_YEAR);
start.add(Calendar.YEAR, 1);
- }
+ }
years = 0;
}
}
@@ -366,9 +366,9 @@
if (!Token.containsTokenWithValue(tokens, M) && months != 0) {
while(start.get(Calendar.MONTH) != end.get(Calendar.MONTH)) {
- String date = start.getTime().toString();
- days += start.getActualMaximum(Calendar.DAY_OF_MONTH);
- start.add(Calendar.MONTH, 1);
+ String date = start.getTime().toString();
+ days += start.getActualMaximum(Calendar.DAY_OF_MONTH);
+ start.add(Calendar.MONTH, 1);
}
days += leapDays;
months = 0;
Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java?view=diff&rev=486525&r1=486524&r2=486525
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java (original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java Tue Dec 12 23:12:38 2006
@@ -424,12 +424,12 @@
assertEqualDuration( "01 26", new int[] { 2006, 0, 15, 0, 0, 0 },
new int[] { 2006, 2, 10, 0, 0, 0 }, "MM dd");
assertEqualDuration( "54", new int[] { 2006, 0, 15, 0, 0, 0 },
- new int[] { 2006, 2, 10, 0, 0, 0 }, "dd");
+ new int[] { 2006, 2, 10, 0, 0, 0 }, "dd");
assertEqualDuration( "09 12", new int[] { 2006, 1, 20, 0, 0, 0 },
new int[] { 2006, 11, 4, 0, 0, 0 }, "MM dd");
assertEqualDuration( "287", new int[] { 2006, 1, 20, 0, 0, 0 },
- new int[] { 2006, 11, 4, 0, 0, 0 }, "dd");
+ new int[] { 2006, 11, 4, 0, 0, 0 }, "dd");
assertEqualDuration( "11 30", new int[] { 2006, 0, 2, 0, 0, 0 },
new int[] { 2007, 0, 1, 0, 0, 0 }, "MM dd");
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org