Format dates with the app's locale instead of toLocaleDateString()
Los mantenedores suelen responder en 1 día
@vaishnavi-codeworld ya está trabajando en esto.
Desde el 26/11/2026.
- #3924 de @vaishnavi-codeworld — abierto
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- nextjs, react, typescript
Línea de trabajo
Start by running the grep in the issue to list the 13 toLocaleDateString()/toLocaleString() calls, mostly in src/components/repo-analytics/, PRMetrics.tsx, GoalTracker.tsx and MilestonePlanner.tsx. Check how next-intl supplies the locale through useLocale() on the client and getLocale() on the server, then add the shared formatDate helper under src/lib/ using Intl.DateTimeFormat. Done when the grep returns nothing and the helper's unit tests pass, including a case near midnight UTC.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
13 places call toLocaleDateString() / toLocaleString() with no locale, so dates follow the browser's language, not the language picked in DevTrack, and the server and client can render different text (hydration warnings).
Where
grep -rnE "toLocale(Date|Time)?String\(\)" src --include=*.tsx
Most are in src/components/repo-analytics/, PRMetrics.tsx, GoalTracker.tsx and MilestonePlanner.tsx.
Expected outcome
A small shared helper (e.g. formatDate(date, locale, options) in src/lib/) built on Intl.DateTimeFormat, used everywhere, with the locale coming from next-intl (useLocale() on the client, getLocale() on the server). Pass timeZone: "UTC" wherever a date-only value is shown, so it doesn't shift by a day.
Acceptance criteria
- No bare
toLocale*String()calls left - Unit tests for the helper, including a date near midnight UTC
- Lenguaje dominante
- TypeScript
- Estrellas
- 246
- Forks
- 436
- Merge medio
- 9 h 33 min
- PR fusionados (30 d)
- 213
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Priyanshu-byte-coder/devtrack
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Los mantenedores suelen responder en 1 día
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPosiblemente ocupada @Nandaninaulaa la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:design
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPosiblemente ocupada @KartikeyG-world la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:design
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Goals: the error banner and the "No goals yet" hint show at the same timePosiblemente ocupada @KartikeyG-world la tomó hace 4 días. Abiertogood first issue level 1 level:beginner status:assigned type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Priyanshu-byte-coder/devtrack
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
makecindy/cindy#15342 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
no-repo-link tool-submission
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100