diff --git a/services/web/frontend/js/features/project-list/components/notifications/groups/confirm-email.tsx b/services/web/frontend/js/features/project-list/components/notifications/groups/confirm-email.tsx index 364e60fd3a..93386ff9a3 100644 --- a/services/web/frontend/js/features/project-list/components/notifications/groups/confirm-email.tsx +++ b/services/web/frontend/js/features/project-list/components/notifications/groups/confirm-email.tsx @@ -73,6 +73,12 @@ const EMAIL_DELETION_SCHEDULE = { '2025-09-03': '2025-03-03', } +const dateOptions: Intl.DateTimeFormatOptions = { + month: 'long', + day: 'numeric', + year: 'numeric', +} + // Emails that remain unconfirmed after 90 days will be removed from the account function getEmailDeletionDate(emailData: UserEmailData, signUpDate: string) { if (emailData.default) return false @@ -95,9 +101,9 @@ function getEmailDeletionDate(emailData: UserEmailData, signUpDate: string) { ) if (currentDate >= notificationStartDate) { if (currentDate > emailDeletionDate) { - return new Date().toLocaleDateString() + return new Date().toLocaleDateString(undefined, dateOptions) } - return emailDeletionDate.toLocaleDateString() + return emailDeletionDate.toLocaleDateString(undefined, dateOptions) } } } diff --git a/services/web/test/frontend/features/project-list/components/notifications.test.tsx b/services/web/test/frontend/features/project-list/components/notifications.test.tsx index 9a845283d7..8813566a2e 100644 --- a/services/web/test/frontend/features/project-list/components/notifications.test.tsx +++ b/services/web/test/frontend/features/project-list/components/notifications.test.tsx @@ -614,8 +614,13 @@ describe('', function () { unconfirmedUserData, signUpDate ) + const dateOptions: Intl.DateTimeFormatOptions = { + month: 'long', + day: 'numeric', + year: 'numeric', + } expect(emailDeletionDate).to.equal( - new Date('2025-09-03').toLocaleDateString() + new Date('2025-09-03').toLocaleDateString(undefined, dateOptions) ) })