You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2004/09/08 00:50:45 UTC
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/time DateUtils.java
scolebourne 2004/09/07 15:50:45
Modified: lang/src/java/org/apache/commons/lang/time DateUtils.java
Log:
Update constants, ensuring that 64bit longs are used properly
Revision Changes Path
1.26 +6 -6 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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- DateUtils.java 29 Aug 2004 03:41:48 -0000 1.25
+++ DateUtils.java 7 Sep 2004 22:50:45 -0000 1.26
@@ -46,19 +46,19 @@
/**
* Number of milliseconds in a standard minute.
*/
- public static final long MILLIS_PER_MINUTE = 60 * 1000;
+ public static final long MILLIS_PER_MINUTE = 60 * MILLIS_PER_SECOND;
/**
* Number of milliseconds in a standard hour.
*/
- public static final long MILLIS_PER_HOUR = 60 * 60 * 1000;
+ public static final long MILLIS_PER_HOUR = 60 * MILLIS_PER_MINUTE;
/**
* Number of milliseconds in a standard day.
*/
- public static final long MILLIS_PER_DAY = 24 * 60 * 60 * 1000;
+ public static final long MILLIS_PER_DAY = 24 * MILLIS_PER_HOUR;
// 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 * 24 * 60 * 60 * 1000) / 12;
+ static final long MILLIS_PER_YEAR = 365 * MILLIS_PER_DAY;
+ static final long MILLIS_PER_MONTH = MILLIS_PER_YEAR / 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