Is moment.js still the best option for calculating the difference between RecordedDate and a second date? | XM Community
Skip to main content
Question

Is moment.js still the best option for calculating the difference between RecordedDate and a second date?

  • 8 June 2024
  • 1 reply
  • 16 views

I have been calculating the difference between two dates using moments.js. The code runs but not consistently across participants. There seems to be some concern on other forums, including the moments.js site, that it is not the best for current browsers. It seems however on this forum that moments is still recommended as the best option. Keen for your thoughts @TomG, given I have been following your excellent recommendations on this.

Thanks in advance

1 reply

Userlevel 7
Badge +27

@jenniehudson,

moment.js is deprecated. You should use luxon instead. I have mentioned it in a few posts.

Leave a Reply