Updated comment
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488858 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1536077409
commit
93aa88fded
|
@ -318,11 +318,10 @@ public class DurationFormatUtils {
|
|||
int leapDays = 0;
|
||||
if (days < 0) {
|
||||
days += start.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
// It's a tricky subject. Jan 15th to March 10th. If I count days-first it is
|
||||
// Multiple answers possible.
|
||||
// For example, for Jan 15th to March 10th. If I count days-first it is
|
||||
// 1 month and 26 days, but if I count month-first then it is 1 month and 23 days.
|
||||
// Here we choose the former.
|
||||
// Also it's contextual - if asked for no M in the format then I should probably
|
||||
// be doing no calculating here.
|
||||
months -= 1;
|
||||
start.add(Calendar.MONTH, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue