Skip to content

[Due for payment 2026-11-12] [$250] Fix localization: dates not being localized correctly #69562

Open

Description

@iwiznia

Problem

We've identified several places where we are not using our localization properly, leading to using formats that are not used in the selected locale.

For example this is with spanish language:
Image

In spanish should be something like 19 ago, 2025 a las 12:02PM or something like that.

Solution

Remove any code that uses a hardcoded date format (not based on the locale) as long as the date is used to display information to users. Some examples (but please check if there are more places):

  • App/src/libs/DateUtils.ts

    Lines 252 to 255 in e091028

    if (date >= startOfCurrentWeek && date <= endOfCurrentWeek) {
    return `${format(date, CONST.DATE.MONTH_DAY_ABBR_FORMAT)} ${at} ${format(date, CONST.DATE.LOCAL_TIME_FORMAT)}${tz}`;
    }
    return `${format(date, CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT)} ${at} ${format(date, CONST.DATE.LOCAL_TIME_FORMAT)}${tz}`;
  • App/src/CONST/index.ts

    Lines 432 to 453 in 0db6a75

    DATE: {
    SQL_DATE_TIME: 'YYYY-MM-DD HH:mm:ss',
    FNS_FORMAT_STRING: 'yyyy-MM-dd',
    FNS_DATE_TIME_FORMAT_STRING: 'yyyy-MM-dd HH:mm:ss',
    LOCAL_TIME_FORMAT: 'h:mm a',
    YEAR_MONTH_FORMAT: 'yyyyMM',
    MONTH_FORMAT: 'MMMM',
    WEEKDAY_TIME_FORMAT: 'eeee',
    MONTH_DAY_ABBR_FORMAT: 'MMM d',
    SHORT_DATE_FORMAT: 'MM-dd',
    MONTH_DAY_YEAR_ABBR_FORMAT: 'MMM d, yyyy',
    MONTH_DAY_YEAR_FORMAT: 'MMMM d, yyyy',
    FNS_TIMEZONE_FORMAT_STRING: "yyyy-MM-dd'T'HH:mm:ssXXX",
    FNS_DB_FORMAT_STRING: 'yyyy-MM-dd HH:mm:ss.SSS',
    LONG_DATE_FORMAT_WITH_WEEKDAY: 'eeee, MMMM d, yyyy',
    UNIX_EPOCH: '1970-01-01 00:00:00.000',
    MAX_DATE: '9999-12-31',
    MIN_DATE: '0001-01-01',
    ORDINAL_DAY_OF_MONTH: 'do',
    MONTH_DAY_YEAR_ORDINAL_FORMAT: 'MMMM do, yyyy',
    SECONDS_PER_DAY: 24 * 60 * 60,
    MONTH_DAYS,

Replace all of then with the standardized dateStyle and timeStyle (using one of the values "full", "long", "medium", and "short"), but let's inspect each case to make sure it makes sense to replace it and with which format exactly we want to replace it.

Additionally, change this to use getWeekInfo().firstDay of the current locale and ensure the calendar component works properly, showing the correct start day according to the locale (FYI 99% sure this is wrong and 6 should be 7)

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021961470094099753846
  • Upwork Job ID: 1961470094099753846
  • Last Price Increase: 2026-05-05
  • Automatic offers:
    • situchan | Contributor | 110344669
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @TaduJR

Activity

  1. self-assigned this
    on Aug 29, 2025
  2. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 29, 2025
  3. changed the title [-]Fix localization dates not being localized for real[/-] [+][$250] Fix localization dates not being localized for real[/+] on Aug 29, 2025
  4. melvin-bot commented on Aug 29, 2025

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 29, 2025
  6. melvin-bot commented on Aug 29, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

  7. melvin-bot commented on Aug 29, 2025

    @melvin-bot

    Triggered auto assignment to @lydiabarclay (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  8. changed the title [-][$250] Fix localization dates not being localized for real[/-] [+][$250] Fix localization: dates not being localized for real[/+] on Aug 29, 2025
  9. changed the title [-][$250] Fix localization: dates not being localized for real[/-] [+][$250] Fix localization: dates not being localized correctly[/+] on Aug 29, 2025
  10. iwiznia commented on Aug 29, 2025

    @iwiznia
    ContributorAuthor

    Yeah, this should all be able to be worked on by an external contributor, since it's just frontend code.

  11. 146 remaining items

  12. roryabraham commented on Nov 11, 2026

    @roryabraham
    Contributor

    @mallenexpensify to help pay for the mega PR that was never merged.

    @TaduJR I know it was a while ago, but please avoid mega PRs in the future.

  13. TaduJR commented on Nov 12, 2026

    @TaduJR
    Contributor

    Thanks @roryabraham for the comment.

    @TaduJR I know it was a while ago, but please avoid mega PRs in the future.

    But this PR was different as merging separately would result in dates that are not consistent. Finally we decided to put it behind beta until all merged that was we went for one mega.

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Nov 12, 2026
  15. changed the title [-][$250] Fix localization: dates not being localized correctly[/-] [+][Due for payment 2026-11-12] [$250] Fix localization: dates not being localized correctly[/+] on Nov 12, 2026
  16. melvin-bot commented on Nov 12, 2026

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.

  17. mallenexpensify commented on Nov 13, 2026

    @mallenexpensify
    Contributor

    Claude posting on behalf of Matt:

    Your call. Job price: $250 (Help Wanted; TaduJR and situchan were assigned before 2026-09-19).

    • TaduJR (Contributor): 100% proposed, via NewDot
    • situchan (C+): 100% proposed, via NewDot

    TaduJR wrote #91569, and situchan approved it. It never merged, because the team split it into smaller PRs. roryabraham reopened this issue to pay for it: comment

    roryabraham calls this issue a duplicate of #98088, where the split PRs landed.

    Next: confirm the amounts, then pay. No Caps+Y.

    Evidence
    • Unmerged PR: #91569 by TaduJR, opened 2026-05-25, closed without merge, approved by situchan.
    • situchan's case for payment: comment
    • Earlier PR: #78251 by sofi-a, merged 2026-01-19, approved by akinwale, iwiznia. Neither author nor reviewer is assigned here.
    • Assigned: situchan 2026-02-04, TaduJR 2026-05-14.
    • C+ checklist: none yet
    • TestRail case: none yet

    PAYPREP v1

  18. mallenexpensify commented on Nov 15, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @TaduJR due $250 via Upwork
    Contributor+: @situchan due $250 via NewDot

    @TaduJR can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022121994350961000701

  19. situchan commented on Nov 15, 2026

    @situchan
    Contributor

    We're assigned before Sep 19

  20. mallenexpensify commented on Nov 16, 2026

    @mallenexpensify
    Contributor

    Thx @situchan , payment summary updated.
    @TaduJR can you please accept the job below? Please reply here and tag me once you have.
    upwork.com/jobs/~022121994350961000701

  21. TaduJR commented on Nov 16, 2026

    @TaduJR
    Contributor

    Offer Accepted @mallenexpensify

    Thanks!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions