Skip to content

fix: use deterministic locale in History date formatting #76

Description

@EmeditWeb

Problem

In History.tsx (line 10), toLocaleString() is called without a locale parameter. This produces different date formats depending on the user's browser locale, which can cause inconsistent display across users.

User impact: Users in different locales see different date formats, making the UI inconsistent.

Root Cause

The locale parameter was omitted during initial development.

What To Build

  1. Add explicit 'en-US' locale parameter to toLocaleString() calls
  2. Or create a formatDate utility in src/lib/formatDate.ts for consistent date formatting across the app

Files To Touch

  • src/pages/History.tsx — line 10 add explicit locale
  • src/lib/formatDate.ts — new utility (optional)

Acceptance Criteria

  • Date format consistent across all browsers/locales
  • No regression in date display

Mandatory Checks

  • context/ files read
  • npm run build passes
  • PR references this issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions