digitalfabrik / integreat-app

React JS and React Native App for Integreat
https://integreat.app
MIT License
45 stars 15 forks source link

IGAPP-281: Remove moment.js #1207

Closed jira-to-github-migrator[bot] closed 11 months ago

jira-to-github-migrator[bot] commented 11 months ago

Michael Markl - 24.6.2020, 16:06:51

We want to remove moment.js as it is no longer required in modern browsers.

Check before starting:

Replace usages of moment with plain Date and Intl support. This works in modern browsers without polyfills. If Intl is not available then use a naive way of formatting the date. IE is not using it.

Arithmetic operations (isBefore, isAfter, +,-) should be trivial to support via the Date API.

Parsing in the API client only works by using ISO8601 strings. This means the api needs to deliver properly formatted time strings.

Acceptance Criteria:

Environment: - Linked issues:

jira-to-github-migrator[bot] commented 11 months ago

Max Ammann - 21.9.2020, 10:52:49

This is important as moment.js is done: https://momentjs.com/docs/#/-project-status/

Maybe https://moment.github.io/luxon/ is good.

Max Ammann - 10.3.2021, 14:16:38

https://date-fns.org/

Max Ammann - 10.3.2021, 14:18:04

For polyfills: https://formatjs.io/docs/polyfills/

f1sh1918 - 5.10.2022, 14:36:51

Another possibility to check: https://github.com/iamkun/dayjs or to use plain JS

sarahsporck - 27.3.2023, 11:21:13

Imo I think we should stick with luxon as rrule already depends on luxon.