[CP Staging] Revert "Fix localization: dates not being localized correctly"#80124
[CP Staging] Revert "Fix localization: dates not being localized correctly"#80124Beamanator merged 1 commit intoExpensify:mainfrom
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d6e2eae60
ℹ️ 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".
| function getWeekStartsOn(): WeekDay { | ||
| return CONST.WEEK_STARTS_ON; |
There was a problem hiding this comment.
The new getWeekStartsOn() always returns CONST.WEEK_STARTS_ON (Monday), so week boundaries no longer respect locale. For locales whose first day is not Monday (e.g., en-US), this shifts the calendar grid and any “this week” checks by one day. generateMonthMatrix() and datetimeToCalendarTime() both rely on these boundaries, so US users will see a Monday‑first calendar and Sundays treated as part of the previous week. Restoring locale-driven week info (e.g., Intl.Locale/weekInfo or date-fns locale settings) would prevent this regression.
Useful? React with 👍 / 👎.
| function formatToLocalTime(datetime: string | Date): string { | ||
| return format(new Date(datetime), CONST.DATE.LOCAL_TIME_FORMAT); |
There was a problem hiding this comment.
Avoid fixed 12-hour time formatting
formatToLocalTime() now formats with CONST.DATE.LOCAL_TIME_FORMAT (h:mm a), which hardcodes a 12‑hour clock and AM/PM. Without locale-aware Intl.DateTimeFormat, users in 24‑hour locales (e.g., fr-FR, de-DE) will see times like “1:30 PM” instead of “13:30”, and the formatting won’t match local conventions. This affects any UI using formatToLocalTime (e.g., AutoUpdateTime). Consider restoring a locale-aware formatter or choosing the format based on the user’s locale.
Useful? React with 👍 / 👎.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Revert "Fix localization: dates not being localized correctly" (cherry picked from commit 13cb681) (cherry-picked to staging by Beamanator)
…216936443-1 🍒 Cherry pick PR #80124 to staging 🍒
|
Ok this shouldddd be in 9.3.5-7 now 🙏 |
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.3.5-7 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.5-7 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.3.6-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.6-4 🚀
|
Explanation of Change
This reverts commit 51b098b.
There were 6 places where conflict happened.
Accept current change with
preferredLocaleremovedAccept current change with
preferredLocaleremoved:Accept current change. No longer need
useMemodependencies.Fixed Issues
$ #80011
$ #80013
$ #80024
Tests
Case 1:
Case 2:
Case 3:
Precondition: User is located in US & current date is 01/21/2026
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
80013.mov
80024.mov