stable
Clone or download
part of request #35496 Drop moment.js from places using tlp-relative-date How to test: - Browse a Git repository with pull requests, go to the "Pull requests" homepage. - The pull requests' creation date should be shown in the format matching your locale: DD/MM/YYYY HH:mm for French, YYYY-MM-DD HH:mm "ISO-like" for English and other locales. - When you change your timezone in user preferences and go back to the page, the "absolute" date should adapt accordingly. For example, choosing "Pacific/Tahiti" could change the day number and the hour. Why? Moment.js is end-of-life. We have built a replacement that uses the native Intl.DateTimeFormat and that correctly takes user timezone into account. It also reduces the weight of the app: 355.40 kB -> 295.26 kB. Change-Id: I16f6a927c3c026b77e8d8bdc73e385699bebf8cd
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/pullrequest/scripts/pullrequest-homepage/package.json | +0 | −1 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-homepage/pnpm-lock.yaml | +0 | −7 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-homepage/src/components/List/PullRequest/PullRequestCreationDate.vue | +9 | −9 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-homepage/src/injection-symbols.ts | +3 | −3 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-homepage/src/pullrequest-homepage.ts | +4 | −3 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-homepage/tests/InjectionSymbolsStub.ts | +2 | −2 | Go to diff View file |