Extensions Wiki » Extensions » Joda Time Plugin

Changes for document Joda Time Plugin

Last modified by Marius Dumitru Florea on 2013/04/15 16:13
From version 12.3
edited by Thomas Mortagne
on 2012/02/22 15:08
To version 13.1
edited by Oana Tabaranu
on 2012/05/04 12:11
Change comment: Added another date example

Metadata changes

Document author
xwiki:XWiki.OanaThomasMobartagneu

Object changes

Object number 0 of type ExtensionCode.ExtensionClass modified

Only Custom Installation instructions
No
Description
... ... @@ -64,6 +64,13 @@
64 64 #set($myBirthday = $formatter.parseDateTime('2007.11.25'))
65 65 #set($daysLeft = $myBirthday.minus($now.millis))
66 66 $daysLeft.getDayOfYear() days left till my birthday!
67 +
68 +## Example 4
69 +#set($formatter = $xwiki.jodatime.getDateTimeFormatterForPattern("dd/MM/yyyy"))
70 +#set($nextDay = $xwiki.jodatime.mutableDateTime)
71 +#set($discard = $nextDay.setMillisOfDay(0))
72 +$!nextDay.addDays(1)
73 +Tomorrow is $nextDay!
67 67 {{/code}}
68 68
69 69 === Parsing date-time from string and comparing with current date-time ===
bundledWith
enterprise|manager
supported
1

Download XWiki