MetaMask / MetaMask/metamask-extension
move `formatDate` from ui/helpers/utils/util.js to `shared`, and standardize its usage
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
We have a `formatDate` method in `ui/helpers/utils/util.js`. We also have one in `shared/notifications/index.ts`. As of https://github.com/MetaMask/metamask-extension/pull/24503, we also have one in `app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts`
We should create one standard `formatDate` method that is used throughout the codebase.
Contributor guide
Research direction
Compare the existing implementations in ui/helpers/utils/util.js, shared/notifications/index.ts, and app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts, then inspect their call sites. The work is done when one shared formatDate method replaces the separate implementations and all usages are standardized across the codebase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100