Eelco - I'm not a maintainer, but I'll give you my opinion, valued at far less than 2 cents. :-) Personally, I like the idea of folks throwing patches like this one up on a VelocityPatches page on the wiki. If people who try the patches like it, the people working on the official code (in this case Nathan, I think) could pull it into the official distro. I know the official method is to submit a patch via bugzilla, but that seems a bit rigid. Maybe I've got a patch I want folks to be able to play with and give me feedback. If they think my patch is worthwhile, they might even suggest improvements, and then maybe I'd submit it for official consideration. The wiki seems perfect for this playground to me. Timo
-----Original Message----- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 1:24 PM To: Velocity Developers List Subject: velocity tools playground So, did you (the current maintainers) think about creating something like a playground for contributions like earlier mentioned on this list? Or do you think the wiki should play that role? Anyway, I think this is a small but usefull patch. In my opinion it is a very common case to work with longs (timestamps) internally where you want to display dates. -- BEGIN Index: DateTool.java =================================================================== RCS file: /home/cvspublic/jakarta-velocity-tools/src/java/org/apache/velocity/tool s/generic/DateTool.java,v retrieving revision 1.2 diff -u -r1.2 DateTool.java --- DateTool.java 28 May 2003 00:17:15 -0000 1.2 +++ DateTool.java 2 Jul 2003 20:18:56 -0000 @@ -282,6 +282,12 @@ { return ((Calendar)obj).getTime(); } + if(obj instanceof Long) + { + Date d = new Date(); + d.setTime(((Long)obj).longValue()); + return d; + } try { //try parsing the obj as String w/a DateFormat -- END Eelco
