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 2004/08/29 05:41:49 UTC
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/time DateUtils.java
bayard 2004/08/28 20:41:49
Modified: lang/src/java/org/apache/commons/lang/time DateUtils.java
Log:
bug in how the maths is being done creates a -ve number
Revision Changes Path
1.25 +2 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java
Index: DateUtils.java
===================================================================
RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- DateUtils.java 27 Aug 2004 06:45:25 -0000 1.24
+++ DateUtils.java 29 Aug 2004 03:41:48 -0000 1.25
@@ -58,7 +58,7 @@
// 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
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org