Hi,
I would like to find all page versions on a descendents tree created before the parent page creation but I would like to exclude all versions created in the same time, for example by a copy of the tree.
So I need to keep the parent creation date and to add 10 seconds to it.
I get a Calendar date with the creation date
#set ($parentPage=$pageManager.getPage($space.key,$paramParentPageName))
#set ($creationDateOriginal=$parentPage.getCreationDate())
#set ($cal = $action.dateFormatter.getCalendar())
$cal.setTimeInMillis($creationDateOriginal.getTime())
But the following line doesn't work :
$cal.add($cal.SECOND,5)
Could you help me please ?
Best regards,
Elodie
How about something like:
#set($cal.setTimeInMillis=$creationDateOriginal.getTime()+ 5000)
Hi,
Unfortunatly, it doesn't work, "$cal.getTime()" displays "Wed Oct 03 11:30:03 CEST 2018" and "$creationDateOriginal" displays "Wed Oct 03 11:30:03 CEST 2018"
#set ($parentPage=$pageManager.getPage($space.key,$paramParentPageName))
#set ($creationDateOriginal=$parentPage.getCreationDate())
$creationDateOriginal
#set ($cal = $action.dateFormatter.getCalendar())
#set($cal.setTimeInMillis=$creationDateOriginal.getTime() + 5000)
$cal.getTime()
Regards,
Elodie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.