We have created a reference manual on how to use XWiki at our company.
I want to create a Wiki Macro which reads the "ContentUpdateDate" and shows
that as a "red flag" when the document has been updated in the last 2 days
(or 5 days).
So I need to know the difference between Now() and ContentUpdateDate :-)
#set($myDate = $doc.getContentUpdateDate())
$doc.getDisplayTitle() has been updated at
$datetool.format('yyyy-MM-dd',$myDate) by $doc.getAuthor()
On the VelocityDocs at
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/t…
there's a method called "whenIs" which is exactly what I want to use to
show
how long ago the reference manual has been updated...
So I tried...
$datetool.whenis('1979-05-02')
$datetool.whenIs('1979-05-02')
$datetool.Whenis('1979-05-02')
$datetool.WhenIs('1979-05-02')
$comparisondatetool.whenIs('1979-05-02')
$comparisondateTool.whenIs('1979-05-02')
$comparisonDatetool.whenIs('1979-05-02')
$comparisonDateTool.whenIs('1979-05-02')
$ComparisonDateTool.whenIs('1979-05-02')
$Comparisondatetool.whenIs('1979-05-02')
$comparisondatetool.whenis('1979-05-02')
$comparisondateTool.whenis('1979-05-02')
$comparisonDatetool.whenis('1979-05-02')
$comparisonDateTool.whenis('1979-05-02')
$ComparisonDateTool.whenis('1979-05-02')
$Comparisondatetool.whenis('1979-05-02')
Nothing works...
I could really need a working example of "whenIs"!
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Velocity-format-date-tp7580272p7580287.ht…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.