Erica, Google: "datetool velocity". First results: http://velocity.apache.org/tools/releases/1.3/javadoc/org/apache/velocity/to... Gives you all the luxury (date objects, calendars, longs....). And make sure the IDE you use remember the class of date-tool for the next time you use it! paul Le 9 déc. 2010 à 19:19, Erica Usui a écrit :
I'm using #set($data=$datetool.get('yyyyMd')) successfully, but i can't compare dates with $data, because it is not a date, i think it is a string.
How can i convert it to a date?
2010/11/29 Paul Libbrecht <[email protected]>
Le 29 nov. 2010 à 07:50, Ricardo Rodriguez [eBioTIC.] a écrit :
Use (XWiki 2.0 Syntax) {{velocity}} $datetool.get('yyyyMd') {{/velocity}}
This has always shocked me as being inefficient since it reparses and re-allocates. I planned to write a little plugin where that would be cared for but never found the time.
Isn't there a standard (cached) date-format?
paul
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Atenciosamente, Erica Usui. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users