Customer Center: dates are always formatted as "dd MMM yyyy" regardless of locale conventions - #3939
Open
tsushanth wants to merge 1 commit into
Conversation
…ardless of locale conventions
tonidero
reviewed
Aug 12, 2026
tonidero
left a comment
Contributor
There was a problem hiding this comment.
Makes sense! I think just having some tests on this could be helpful 🙏
| private fun formatUsingDateTimeFormatter(date: Date, locale: Locale): String { | ||
| val localDate = date.toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate() | ||
| val formatter = DateTimeFormatter.ofPattern("dd MMM yyyy", locale) | ||
| val formatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM).withLocale(locale) |
Contributor
There was a problem hiding this comment.
Maybe we could add some tests to verify the new expected output and make sure it's what we expect for different locales? Let us know if you need some help with this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace hardcoded "dd MMM yyyy" date pattern with locale-sensitive formatting using
DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)andDateFormat.getDateInstance(DateFormat.MEDIUM, locale)Found via automated repo scanning, fix written and reviewed before opening.
Note
Low Risk
Small UI localization change to date display only; no auth, data, or business-logic impact.
Overview
Customer Center dates no longer always render as
"dd MMM yyyy".DefaultDateFormatternow uses locale-aware medium date styles (DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)/DateFormat.getDateInstance(MEDIUM)), so expiration and renewal dates follow each locale’s conventions.Reviewed by Cursor Bugbot for commit 9c7f135. Bugbot is set up for automated code reviews on this repo. Configure here.