From a88c31825151f37d6627eacc3820679f2f0bf316 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Sun, 29 Aug 2004 03:41:48 +0000 Subject: [PATCH] bug in how the maths is being done creates a -ve number git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137905 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/time/DateUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/commons/lang/time/DateUtils.java b/src/java/org/apache/commons/lang/time/DateUtils.java index 1717cbbc7..033203a35 100644 --- a/src/java/org/apache/commons/lang/time/DateUtils.java +++ b/src/java/org/apache/commons/lang/time/DateUtils.java @@ -31,7 +31,7 @@ import java.util.TimeZone; * @author Gary Gregory * @author Phil Steitz * @since 2.0 - * @version $Id: DateUtils.java,v 1.24 2004/08/27 06:45:25 bayard Exp $ + * @version $Id: DateUtils.java,v 1.25 2004/08/29 03:41:48 bayard Exp $ */ public class DateUtils { @@ -58,7 +58,7 @@ public class DateUtils { // hmm. not very accurate. used by DurationFormatUtils static final long MILLIS_PER_YEAR = 365 * 24 * 60 * 60 * 1000; - static final long MILLIS_PER_MONTH = 365 / 12 * 24 * 60 * 60 * 1000; + static final long MILLIS_PER_MONTH = (365 * 24 * 60 * 60 * 1000) / 12; /** * This is half a month, so this represents whether a date is in the top