Skip to content

Customer Center: dates are always formatted as "dd MMM yyyy" regardless of locale conventions - #3939

Open
tsushanth wants to merge 1 commit into
RevenueCat:mainfrom
tsushanth:fix/Customer-Center-dates-are-always-formatt-1786295176
Open

Customer Center: dates are always formatted as "dd MMM yyyy" regardless of locale conventions#3939
tsushanth wants to merge 1 commit into
RevenueCat:mainfrom
tsushanth:fix/Customer-Center-dates-are-always-formatt-1786295176

Conversation

@tsushanth

@tsushanth tsushanth commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Replace hardcoded "dd MMM yyyy" date pattern with locale-sensitive formatting using DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM) and DateFormat.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". DefaultDateFormatter now 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.

@tsushanth
tsushanth requested a review from a team as a code owner August 12, 2026 05:14

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants