Hello,
I try to create user macro which display, as a number, current calendar week + n.
Where "n" is written in the @ param.
This is my code:
## @param Nextcw:title=Calendar week +n |type=int|required=true|desc="n" value
#set ($n = $paramNextcw)
#set($Integer = 0)
#set($Integer= $Integer.parseInt($n))
#set($calendar = $action.dateFormatter.calendar)
#set($cweek= $calendar.get(3)+$Integer)
$cweek
It's working almost good. But the problem is that variable $cweek is an integer.
I assume that I should convert it to the type "date"? In other way I'll get values above 52.
But I have no idea how to handle it. I would add that this is my first usermacro. So I'm total newbie.