Page MenuHomePhabricator

Use Intl instead of moment
Open, Needs TriagePublic

Description

The NewImpact module and the Send Praise module (mentor dashboard) show, in the "Last edited" scorecard, a datetime parsed with localization perferences with momentjs, eg: 20 hours ago. However Intl is used in other scorecard date formatting, eg: Feb 13—16.

Screenshot 2023-07-19 at 13.32.53.png (668×650 px, 81 KB)

Moment is known to be heavy and in deprecation status (See T146798: Replace Moment.js in core with something smaller (what?)) so there's an opportunity to replace moment usage with Intl safely and have a benefit in terms of payload size and dependency simplification.

Checklist