Changes for page Release Notes for XWiki 5.0 Release Candidate 1
Last modified by Thomas Mortagne on 2017/03/24
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -37,10 +37,21 @@ 37 37 38 38 = For Developers = 39 39 40 -== <developerfeatureN>==40 +== Joda Time plugin adds Duration API == 41 41 42 - <descriptionfdeveloperfeatureN>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>