Skip to content

Commit 9bc1bf4

Browse files
authored
chore: remove yy/LL/dd formatter date format (#798)
## Problem Realised that we have conflicting formats `dd/LL/yy` vs `yy/LL/dd` and it could pose as a problem when people use this format later in a delay step ## Solution Remove the `yy/LL/dd` datetime format ## Regression test - Check that prod doesn't have any steps that uses this date format thankfully (only 2 but both are deleted) Simple query: ``` SELECT * FROM steps WHERE key = 'dateTime' and parameters::text ilike '%"formatDateTimeToFormat": "yy/LL/dd"%'' ```
1 parent d90ca7a commit 9bc1bf4

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

packages/backend/src/apps/formatter/__tests__/date-time.format.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ describe('convert date time', () => {
3535
{ toFormat: 'dd/LL/yyyy', expectedResult: '01/04/2024' },
3636
{ toFormat: 'dd LLL yyyy', expectedResult: '01 Apr 2024' },
3737
{ toFormat: 'dd LLLL yyyy', expectedResult: '01 April 2024' },
38-
{ toFormat: 'yy/LL/dd', expectedResult: '24/04/01' },
3938
{ toFormat: 'yyyy/LL/dd', expectedResult: '2024/04/01' },
4039
{ toFormat: 'hh:mm a', expectedResult: '12:05 pm' },
4140
{ toFormat: 'hh:mm:ss a', expectedResult: '12:05:10 pm' },

packages/backend/src/apps/formatter/actions/date-time/transforms/convert-date-time/fields.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const formatStringsEnum = z.enum([
99
'dd/LL/yyyy',
1010
'dd LLL yyyy',
1111
'dd LLLL yyyy',
12-
'yy/LL/dd',
1312
'yyyy/LL/dd',
1413
'hh:mm a',
1514
'hh:mm:ss a',
@@ -49,11 +48,6 @@ export const field = {
4948
description: '02 January 2006',
5049
value: ensureZodEnumValue(formatStringsEnum, 'dd LLLL yyyy'),
5150
},
52-
{
53-
label: 'YY/MM/DD',
54-
description: '24/01/22',
55-
value: ensureZodEnumValue(formatStringsEnum, 'yy/LL/dd'),
56-
},
5751
{
5852
label: 'YYYY/MM/DD',
5953
description: '2024/01/22',

0 commit comments

Comments
 (0)