diff --git a/packages/backend/server/package.json b/packages/backend/server/package.json
index 632da0ca1..ad84c82d6 100644
--- a/packages/backend/server/package.json
+++ b/packages/backend/server/package.json
@@ -66,6 +66,7 @@
"@socket.io/redis-adapter": "^8.3.0",
"bullmq": "^5.40.2",
"cookie-parser": "^1.4.7",
+ "date-fns": "^4.0.0",
"dotenv": "^16.4.7",
"eventemitter2": "^6.4.9",
"eventsource-parser": "^3.0.0",
diff --git a/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.md b/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.md
index 171a78b8a..88acddcff 100644
--- a/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.md
+++ b/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.md
@@ -1403,9 +1403,9 @@ Generated by [AVA](https://avajs.dev).
>Test Workspace␊
team workspace expired on␊
- 1/1/2025. All workspace␊
- data will be permanently deleted on␊
- 1/31/2025 (180 days after␊
+ 2025-01-01. All workspace␊
+ data will be permanently deleted on␊
+ 2025-01-31 (180 days after␊
expiration). To prevent data loss, please either:␊
␊
Test Workspace␊
- team workspace data will be permanently deleted in 24 hours on␊
- 1/31/2025. To prevent data␊
+ team workspace data will be permanently deleted in 24 hours on␊
+ 2025-01-31. To prevent data␊
loss, please take immediate action:␊
␊
Test Workspace␊
team workspace will expire on␊
- 1/1/2025. After expiration,␊
- you won't be able to sync or collaborate with team members.␊
- Please renew your subscription to continue using all team␊
- features.␊
+ 2025-01-01. After␊
+ expiration, you won't be able to sync or collaborate with␊
+ team members. Please renew your subscription to continue using␊
+ all team features.␊
␊
␊
␊
@@ -1870,7 +1870,7 @@ Generated by [AVA](https://avajs.dev).
>Test Workspace␊
team workspace expired on␊
- 1/1/2025. Your workspace␊
+ 2025-01-01. Your workspace␊
can't sync or collaborate with team members. Please renew␊
your subscription to restore all team features.␊
␊
diff --git a/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.snap b/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.snap
index de44f7bd0..d6bbe8967 100644
Binary files a/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.snap and b/packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.snap differ
diff --git a/packages/backend/server/src/mails/components/date.tsx b/packages/backend/server/src/mails/components/date.tsx
new file mode 100644
index 000000000..df24dc295
--- /dev/null
+++ b/packages/backend/server/src/mails/components/date.tsx
@@ -0,0 +1,11 @@
+import { format } from 'date-fns';
+
+import { Bold } from './template';
+
+export interface DateProps {
+ value: Date;
+}
+
+export const IOSDate = (props: DateProps) => {
+ return {format(props.value, 'yyyy-MM-dd')};
+};
diff --git a/packages/backend/server/src/mails/components/index.ts b/packages/backend/server/src/mails/components/index.ts
index cc33e3851..bacdecaca 100644
--- a/packages/backend/server/src/mails/components/index.ts
+++ b/packages/backend/server/src/mails/components/index.ts
@@ -1,3 +1,4 @@
+export * from './date';
export * from './template';
export * from './user';
export * from './workspace';
diff --git a/packages/backend/server/src/mails/teams/delete-in-1m.tsx b/packages/backend/server/src/mails/teams/delete-in-1m.tsx
index cadd1b9a2..545e29495 100644
--- a/packages/backend/server/src/mails/teams/delete-in-1m.tsx
+++ b/packages/backend/server/src/mails/teams/delete-in-1m.tsx
@@ -1,8 +1,8 @@
import { TEST_WORKSPACE } from '../common';
import {
- Bold,
Button,
Content,
+ IOSDate,
P,
Template,
Text,
@@ -27,10 +27,9 @@ export default function TeamDeleteInOneMonth(props: TeamDeleteInOneMonthProps) {
Your team workspace expired on{' '}
- {expirationDate.toLocaleDateString()}. All workspace data
- will be permanently deleted on{' '}
- {deletionDate.toLocaleDateString()} (180 days after
- expiration). To prevent data loss, please either:
+ . All workspace data will be
+ permanently deleted on (180 days
+ after expiration). To prevent data loss, please either:
Your team workspace data will be
- permanently deleted in 24 hours on{' '}
- {deletionDate.toLocaleDateString()}. To prevent data
- loss, please take immediate action:
+ permanently deleted in 24 hours on .
+ To prevent data loss, please take immediate action:
Your team workspace will expire on{' '}
- {expirationDate.toLocaleDateString()}. After expiration,
- you won't be able to sync or collaborate with team members.
- Please renew your subscription to continue using all team features.
+ . After expiration, you won't
+ be able to sync or collaborate with team members. Please renew your
+ subscription to continue using all team features.
Your team workspace expired on{' '}
- {expirationDate.toLocaleDateString()}. Your workspace
- can't sync or collaborate with team members. Please renew your
- subscription to restore all team features.
+ . Your workspace can't sync or
+ collaborate with team members. Please renew your subscription to
+ restore all team features.