Date and Time Utilities - elapsedtime function error

Hello,

I'm facing an issue I can't explain with the Date and Time Utilities plugin (more info here: https://community.appian.com/b/appmarket/posts/date-and-time-utilities).

The function elapsedtime takes two datetimes in parameter and calculates the total of elapsed time from years up to seconds between the two given dates.

It returns an int array with the elapsed years, months, days, hours, minutes, and seconds.

For instance, 

elapsedtime(
todatetime(date(1942,2,10)),
todatetime(date(2019,10,28))
)

works well and returns the following anwser: {77, 8, 18, 14, 52, 44}

But, in other cases, like this one: 

elapsedtime(
todatetime(date(1940,1,31)),
todatetime(date(2019,10,28))
)

the function throws the following error : "The first calendar should be dated before the second calendar."

For information, I am working with 19.3 (Cloud) version.

Does anyone is facing the same issue with this function or sees if something is wrong in calling it this way?

Thanks a lot,

Valerian

  Discussion posts and replies are publicly visible