Repository navigation
Format the e-receipt date with the shared long-date helper - #105870
Conversation
Read the plain yyyy-MM-dd date from getTransactionDetails and format it with DateUtils.formatToReadableString instead of passing the hand-written MONTH_DAY_YEAR_FORMAT pattern through getTransactionDetails. Output is unchanged today and follows the shared helper once it is localized. Drop the unused format argument from PerDiemEReceipt.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Port the test from Expensify#105846 that getTransactionDetails returns yyyy-MM-dd in German and Japanese, which the e-receipt now formats itself.
…calize-dates-receipts # Conflicts: # src/libs/TransactionUtils/index.ts
|
@linhvovan29546 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f90bbd79ac
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: mWeb Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.36-0 🚀
|
|
No FullStory changes needed — this PR only refactors transaction-date handling and e-receipt date formatting, without adding new interactions, screens, outcomes, user attributes, or sensitive content. |
|
No help site update needed — this PR refactors receipt date formatting without adding a user-facing feature, changing a workflow, or making any existing help article sentence incorrect. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.36-0 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
The e-receipt built its date by passing the hand-written pattern
CONST.DATE.MONTH_DAY_YEAR_FORMAT(MMMM d, yyyy) intogetTransactionDetails. That ties the receipt to a fixed US-order pattern that cannot be localized.The e-receipt now reads the plain
yyyy-MM-dddate fromgetTransactionDetailsand formats it withDateUtils.formatToReadableString, the shared long-date helper. The output is unchanged today (June 20, 2026), and the receipt picks up the localized long date (for example20. Juni 2026in German) from the companion PR that localizesformatToReadableString. The calendar day is still the stored day, with no shift in timezones behind UTC.PerDiemEReceiptpassed the same pattern togetTransactionDetailsbut never used the formatted date, so the unused argument is removed.With those two gone, nothing passes a date format or a locale to
getTransactionDetailsany more, so both parameters are removed:getTransactionDetailsdropscreatedDateFormatanddateFnsLocale.createdis alwaysyyyy-MM-dd, which date-fns writes the same way in every locale (checked against all 95 date-fns locales), so a date shown to the user is formatted from it with the user's locale.getFormattedCreatedtakes only the transaction and usesDateUtils.formatMachineDateWithUTCTimeZone, since every caller already used the defaultyyyy-MM-dd.undefinedonly to reach a later parameter (policy,allowNegativeAmount,disableOppositeConversionorreportOwnerAsAttendee) drop that argument. The other arguments keep their meaning.This is one of a set of small, independent PRs that split up the date-localization work in #105846. They can merge in any order.
Fixed Issues
$ #98088
PROPOSAL:
Tests
June 20, 2026, on the same day as the expense.Offline tests
Same as tests.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos