difference between calendarMonthsBetween and MonthsBetween

0
Hello,   Is there a difference between the function ‘calendarMonthsBetween’ and the community commons java action ‘MonthsBetween’?
asked
2 answers
7

Hi Emin ,

 

    In calendermonthsbetween you need to give both From and To datetime but in monthsbetween if To date is EMPTY, the current datetime will be used.

 

Both will give the number of months as output

answered
1

The calendarMonthsBetween function calculates the absolute difference between the input values in months. Time will be ignored. The dates are assumed to be in the end-user’s local time zone.

 

Monthsbetween:

 

/*** Calculates the number of months between two dates. * - dateTime : the original (oldest) dateTime* - compareDate: the second date. If EMPTY, the current datetime will be used. Effectively this means that the age of the dateTime is calculated. */

 

 

 

answered