Hi, i'm using JIRA 6.3.9
I have day of birth, and i need to count person's age, so, i wrote:
interval age = currentDate() - customfield_10001;
return "age " + age + " years";
But it showing in format 2087w 14h 43m 28s
What i need to do to see years only?
We didn't create / expect such accessor for interval, we must admit this. You should do something like:
number ageinyears = floor(age["WEEK"]/52, 0); return ageinyears;
check: http://confluence.kepler-rominfo.com/display/SIL30/Operators
Another option is to substract year(currentDate()) - year(date), but you must check if birthday of the person already passed this year or not in order to correct it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.