Skip to content

Commit

Permalink
chore: remove yy/LL/dd formatter date format (#798)
Browse files Browse the repository at this point in the history
## 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"%''
```
  • Loading branch information
m0nggh authored Nov 27, 2024
1 parent d90ca7a commit 9bc1bf4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ describe('convert date time', () => {
{ toFormat: 'dd/LL/yyyy', expectedResult: '01/04/2024' },
{ toFormat: 'dd LLL yyyy', expectedResult: '01 Apr 2024' },
{ toFormat: 'dd LLLL yyyy', expectedResult: '01 April 2024' },
{ toFormat: 'yy/LL/dd', expectedResult: '24/04/01' },
{ toFormat: 'yyyy/LL/dd', expectedResult: '2024/04/01' },
{ toFormat: 'hh:mm a', expectedResult: '12:05 pm' },
{ toFormat: 'hh:mm:ss a', expectedResult: '12:05:10 pm' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const formatStringsEnum = z.enum([
'dd/LL/yyyy',
'dd LLL yyyy',
'dd LLLL yyyy',
'yy/LL/dd',
'yyyy/LL/dd',
'hh:mm a',
'hh:mm:ss a',
Expand Down Expand Up @@ -49,11 +48,6 @@ export const field = {
description: '02 January 2006',
value: ensureZodEnumValue(formatStringsEnum, 'dd LLLL yyyy'),
},
{
label: 'YY/MM/DD',
description: '24/01/22',
value: ensureZodEnumValue(formatStringsEnum, 'yy/LL/dd'),
},
{
label: 'YYYY/MM/DD',
description: '2024/01/22',
Expand Down

0 comments on commit 9bc1bf4

Please sign in to comment.