How i can do this calculation between birth date and another value

Hi i got this use case


the first value is birthdate, second the age in years.

The others two values needs to be calculated.

So in my country we have retirement for Women at age of 57 and they can anticipate the retirment at 55

For Men at age of 62 and anticipated 60.

I forgot to put the value of gender i got that too M and F for female.

Whats the best approach to achieve this?

thank you

1 Like

I'm not entirely certain if this aligns with your problem, but based on my understanding, this should function as you described.

{{ gender.value === "F" ?moment(dob.value).add(57, 'years'): moment(dob.value).add(62, 'years')


thank you ! works perfect