InseeFr / Trevas-TS

JavaScript engine for the Validation and Transformation Language
MIT License
9 stars 8 forks source link

SDT survey: Calculate the duration between two dates (a getDiff function) #72

Open FabiennePG opened 3 years ago

FabiennePG commented 3 years ago

The SDT survey needs to calculate the number of nights of a given trip, knowing the departure date and the arrival date. A getDiff function working with two dates or a difference of dates as parameters (see xpath days-from-duration) and if possible a format (days, months, years) would be welcome.

romaintailhurat commented 2 years ago

As of today (7th of january 2022), this is still a pending need for the SDT survey.

linardian commented 1 year ago

A new operator datediff is planned for next VTL release. Stay tuned!