svn commit: r604898 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r604898 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java

hansbak-2
Author: hansbak
Date: Mon Dec 17 07:24:46 2007
New Revision: 604898

URL: http://svn.apache.org/viewvc?rev=604898&view=rev
Log:
another small day calculation class to be used in minilanguage

Modified:
    ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java

Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java?rev=604898&r1=604897&r2=604898&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilDateTime.java Mon Dec 17 07:24:46 2007
@@ -83,6 +83,10 @@
         return new Timestamp(start.getTime() + (24*60*60*1000*days));
     }
 
+    public static Timestamp addDaysToTimestamp(Timestamp start, Double days) {
+        return new Timestamp(start.getTime() + ((int) (24*60*60*1000*days)));
+    }
+
     public static double getInterval(Timestamp from, Timestamp thru) {
         return thru != null ? thru.getTime() - from.getTime() + (thru.getNanos() - from.getNanos()) / 1000000 : 0;
     }