velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r493081 - /velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java
Date Fri, 05 Jan 2007 16:48:10 GMT
Author: cbrisson
Date: Fri Jan  5 08:48:09 2007
New Revision: 493081

URL: http://svn.apache.org/viewvc?view=rev&rev=493081
Log:
new method getSystemTime that allows .systemTime instead of .systemDate.time for the number
of millisecs since January 1, 1970

Modified:
    velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java

Modified: velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java?view=diff&rev=493081&r1=493080&r2=493081
==============================================================================
--- velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java (original)
+++ velocity/tools/trunk/src/java/org/apache/velocity/tools/generic/DateTool.java Fri Jan
 5 08:48:09 2007
@@ -110,6 +110,15 @@
     // ------------------------- system date access ------------------
 
     /**
+     * @return the system's current time as the number of milliseconds
+     * elapsed since January 1, 1970, 00:00:00 GMT.
+     */
+    public static final long getSystemTime()
+    {
+        return getSystemCalendar().getTime().getTime();
+    }
+
+    /**
      * @return the system's current time as a {@link Date}
      */
     public static final Date getSystemDate()



Mime
View raw message