Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGAPP-281: Remove moment.js #1207

Closed
jira-to-github-migrator bot opened this issue Aug 12, 2023 · 1 comment
Closed

IGAPP-281: Remove moment.js #1207

jira-to-github-migrator bot opened this issue Aug 12, 2023 · 1 comment
Assignees
Labels
Native Affects the native project shared Affects the shared project Task Web Affects the web project

Comments

@jira-to-github-migrator
Copy link

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:

    • IE must support Intl (?)-

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:

  • moment is no longer used in any files in integreat-app
  • Formatting works perfectly Firefox, Chrome, Android, iOS
  • Locales like de, en, fa, ar, ps, ckb, kmr are reasonably supported
  • Formatting does not throw errors in IE11
  • Upgrade i18next to v21 or create a new issue (blocked by intl support)

Environment: -
Linked issues:

@jira-to-github-migrator jira-to-github-migrator bot added shared Affects the shared project Native Affects the native project Task Web Affects the web project django labels Aug 12, 2023
@jira-to-github-migrator
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Native Affects the native project shared Affects the shared project Task Web Affects the web project
Projects
None yet
Development

No branches or pull requests

2 participants