Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

IGAPP-281: Remove moment.js #1224

Closed
jira-to-github-migrator-test bot opened this issue Jul 25, 2023 · 1 comment
Closed

IGAPP-281: Remove moment.js #1224

jira-to-github-migrator-test bot opened this issue Jul 25, 2023 · 1 comment

Comments

@jira-to-github-migrator-test
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:

  • Blocks: IGAPP-1107
  • Blocks: IGAPP-39
  • Blocks: IGAPP-92
  • Blocks: IGAPP-399
  • Blocks: IGAPP-1321
  • Blocks: IGAPP-195
  • Relates: IGAPP-28
  • Relates: IGAPP-42
  • Relates: IGAPP-277
  • Relates: IGAPP-195
  • Relates: IGAPP-399
@jira-to-github-migrator-test
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/

Andreas Fischer - 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant