Last modified by Thomas Mortagne on 2017/03/24

<
From version < 9.1 >
edited by Marius Dumitru Florea
on 2013/04/16
To version < 10.1 >
edited by Marius Dumitru Florea
on 2013/04/16
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -37,10 +37,21 @@
37 37  
38 38  = For Developers =
39 39  
40 -== <developer feature N> ==
40 +== Joda Time plugin adds Duration API ==
41 41  
42 -<description of developer feature N>
42 +The [[Joda Time plugin>>extensions:Extension.Joda Time Plugin]] API was extended with 2 new methos for creating durations. Here's an example:
43 43  
44 +{{code language="none"}}
45 +{{velocity}}
46 +#set ($endDate = $xwiki.jodatime.getDateTime($endDateTimeStamp))
47 +#set ($currentDate = $xwiki.jodatime.getDateTime())
48 +#set ($duration = $xwiki.jodatime.getDuration($endDate, $currentDate))
49 +The number of days passed since the end date is: $duration.standardDays
50 +{{/velocity}}
51 +{{/code}}
52 +
53 +Check the [[Duration javadoc>>http://joda-time.sourceforge.net/apidocs/org/joda/time/Duration.html]] for more information.
54 +
44 44  == Deprecated and Retired projects ==
45 45  
46 46  <description of deprecated and retired projects>

Get Connected