Repository navigation
Localize readable long dates and the next billing date - #105869
Conversation
Add DateUtils.formatToLongDate, which formats a date's local calendar fields with a cached Intl.DateTimeFormat, and use it in formatToReadableString and getNextBillingDate. Other languages get their own component order; English output is unchanged, and an invalid date now returns an empty string.
A cached Intl.DateTimeFormat keeps the device timezone from when it was created. Format in UTC and copy the date's current local fields instead.
|
@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. |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-11-10.at.09.59.21.moviOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-11-10.at.09.56.15.mov |
|
@linhvovan29546 Resolved |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 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 fixes date localization and invalid-date handling in existing UI, without adding new screens, interactions, user properties, or sensitive content. |
|
No help site update needed — this fixes date formatting to match the selected language as users would expect, without adding a workflow or making any existing article factually incorrect. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.36-0 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
DateUtils.formatToReadableStringand the subscription's next billing date formatted local dates with the hand-written date-fns patternMMMM d, yyyy. The pattern fixes the US component order, so other languages showed their own month name in an English shape, for exampleJuni 20, 2026in German.This adds
DateUtils.formatToLongDate, which formats a date's local calendar fields with a cachedIntl.DateTimeFormatin the app's selected language.formatToReadableStringnow uses it, and so doesgetNextBillingDate:formatToReadableStringis used for:On,After,Before) and day group headingsCardUtilsAn invalid date now returns an empty string instead of throwing.
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. Each one caches its own
Intl.DateTimeFormatnext to the function it changes; a follow-up will merge those into one shared helper.Fixed Issues
$ #98088
PROPOSAL:
Tests
20. Juni 2026.June 20, 2026, the same as before.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
Screen.Recording.2026-11-08.at.9.56.46.AM.mov