Skip to content

Replace moment-js with non-deprecated alternatives

What needs to be changed?

As moment-js moved to a maintenance-only stage and DateTime localization / arithmetic became part of JS/ECMA supported by most browsers we should move to more modern alternatives like luxon.

Which tasks should be done beforehand

  • Check if alternative (e.g. luxon) can fully replace our current uses of moment-js (especially durations and relative date formatting)
  • Check if alternative fully supports targeted browsers (mobile/safari/chrome/firefox)
  • Check if alternative supports our version combination of typescript/node/angular
  • Check if alternative works for us without polyfill.io

Which changes are necessary?

Replace usages / calls of moment-js with the corresponding alternative.

Do the proposed changes impact current use cases?

Most likely not. Check tasks.

Edited by Rainer Killinger