I’ve seen the post where the days between two dates can be calculated by converting the two dates to milliseconds past the Unix epoch, subtracting them, and then converting the result to the desired unit of time. Please add a DateDiff function to the Expression Language that would take two Joda DateTime objects as input and calculate the difference based on the user supplied time unit.
DateDiff (Joda DateTime 1, Joda DateTime 2, unit)
where unit could be milliseconds, seconds, minutes, hours, days, months, years.
I would say this is something that can be done with an Expression Library and not necessarily something that needs to be supported natively in the language. I’ve written a prototype that is modeled after the Java TimeUnit and ChronoUnit interfaces. You can take a look here:
To use it in a pipeline, import the library into the pipeline and then you can reference it like so: