spreed icon indicating copy to clipboard operation
spreed copied to clipboard

Remove moment.js

Open ShGKme opened this issue 10 months ago • 2 comments

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

moment.js (@nextcloud/moment) is deprecated, unmaintained, and in many cases unnecessary.

Instead:

  • When possible, replace with simple JS (Date)
  • For l10n - use Intl
  • If necessary - for more complex cases use dayjs (without i18n)
  • Also fixes: https://github.com/nextcloud/spreed/issues/3441

ShGKme avatar Feb 15 '25 19:02 ShGKme

Cannot wait to finally see Temporal to be widely supported 😭

Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#browser_compatibility

RubensRainelli avatar Jun 18 '25 01:06 RubensRainelli

Temporal doesn't help here. Most of the moment.js usage in Nextcloud is localization, not date utils. It can be (and is already) replaced by Intl.

Resolving this issue does not require waiting for Temporal API.

ShGKme avatar Jun 18 '25 09:06 ShGKme