ait-cs-IaaS/koord2ool

Temporal instead of Moment

Opened this issue · 1 comments

Currently, Koord2ool uses Moment.js for date manipulation and handling beyond JavaScript's intrinsic API.

However, TC39 has a proposal with a new Temporal class. It has not landed in production-grade ECMAScript yet, but it is likely to be included in future ECMAScript releases.

Once Temporal is live and production-ready, Moment.js should be switched out in favor of it.

Additionally chart.js which is used for visualizing charts uses moment.js for time-based x-axes.

This may require chart.js to do the switch first before we can address this.

The things to watch out for to see if this feature can be integrated:

moment.js is heavily used by chart.js for time axes. So it will need to be adopted by them first before we can do the switch, which likely requires widespread support by browsers. Currently, not a single browser supports it.