Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AAE-39261 Fix Portuguese date format to display dd/mm/yyyy #11303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mkrbr wants to merge 1 commit into develop
base: develop
Choose a base branch
Loading
from fix/AAE-39261-portuguese-date-format

Conversation

@mkrbr
Copy link
Contributor

@mkrbr mkrbr commented Oct 24, 2025
edited by atlassian bot
Loading

Description

Fixes AAE-39261

When selecting Portuguese language in application settings, dates in Dashboard's 'From Date' and 'To Date' fields were incorrectly displaying in mm/dd/yyyy format instead of the expected dd/mm/yyyy format.

Changes Made

  • Added support for 'pt' locale code in DateFnsUtils.getLocaleFromString()
  • Both 'pt' and 'pt-BR' now correctly map to ptBR locale which uses dd/mm/yyyy format
  • Added comprehensive test coverage for all locale mappings (100% coverage for getLocaleFromString method)
  • Fixed naming conflict by aliasing Italian locale import to avoid shadowing Jasmine's it function

Testing

  • ✅ All 40 tests passing in date-fns-utils.spec.ts
  • ✅ 20 locale-specific tests ensuring all supported locales map correctly
  • ✅ Portuguese (both 'pt' and 'pt-BR') now correctly use dd/mm/yyyy format

Steps to Reproduce Original Issue

  1. Login to Studio Admin with processadminuser
  2. Navigate to Process Admin → Dashboards
  3. Select today's date in the 'From Date' and 'To Date' field
  4. Click on Application Settings (Gear icon) and select 'Portugues'

Expected: Date displays as dd/mm/yyyy
Actual (before fix): Date displayed as mm/dd/yyyy
Actual (after fix): Date displays as dd/mm/yyyy ✅

- Added support for 'pt' locale code in DateFnsUtils.getLocaleFromString()
- Both 'pt' and 'pt-BR' now correctly map to ptBR locale (dd/mm/yyyy format)
- Added comprehensive test coverage for all locale mappings using data-driven tests
- Fixed naming conflict by aliasing Italian locale import
Copy link

@mkrbr mkrbr changed the title (削除) [AAE-39261] Fix Portuguese date format to display dd/mm/yyyy (削除ここまで) (追記) AAE-39261 Fix Portuguese date format to display dd/mm/yyyy (追記ここまで) Oct 24, 2025
@mkrbr mkrbr requested a review from Copilot October 24, 2025 11:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a date format display issue where the Portuguese language setting was showing dates in mm/dd/yyyy format instead of the expected dd/mm/yyyy format. The fix adds support for the 'pt' locale code to correctly map to the ptBR locale.

Key changes:

  • Added 'pt' locale code mapping to ptBR in the DateFnsUtils class
  • Added comprehensive test coverage for all locale mappings including the new 'pt' case
  • Aliased Italian locale import to avoid naming conflict with Jasmine's it function

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/core/src/lib/common/utils/date-fns-utils.ts Added 'pt' case to switch statement to map to ptBR locale
lib/core/src/lib/common/utils/date-fns-utils.spec.ts Added comprehensive test suite for getLocaleFromString method covering all locale mappings including 'pt' and 'pt-BR'

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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

Reviewers

Copilot code review Copilot Copilot left review comments

@eromano eromano Awaiting requested review from eromano eromano is a code owner

@popovicsandras popovicsandras Awaiting requested review from popovicsandras popovicsandras is a code owner

@DenysVuika DenysVuika Awaiting requested review from DenysVuika DenysVuika is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /