Skip to content

Commit

Permalink
fix(admin-ui): Use correct 24hr format for locale in dates (#2972)
Browse files Browse the repository at this point in the history
Fixes #2970
  • Loading branch information
William Rijksen authored Jul 31, 2024
1 parent 6708440 commit f078b41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ describe('LocaleDatePipe', () => {

it('medium format German', () => {
const pipe = new LocaleDatePipe();
expect(pipe.transform(testDate, 'medium', LanguageCode.de)).toBe('12. Jan. 2021, 9:12:42 AM');
expect(pipe.transform(testDate, 'medium', LanguageCode.de)).toBe('12. Jan. 2021, 09:12:42');
});

it('medium format Chinese', () => {
const pipe = new LocaleDatePipe();
expect(pipe.transform(testDate, 'medium', LanguageCode.zh)).toBe('2021年1月12日 上午9:12:42');
expect(pipe.transform(testDate, 'medium', LanguageCode.zh)).toBe('2021年1月12日 09:12:42');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ export class LocaleDatePipe extends LocaleBasePipe implements PipeTransform {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: true,
};
case 'mediumTime':
return {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: true,
};
case 'longDate':
return {
Expand All @@ -75,7 +73,6 @@ export class LocaleDatePipe extends LocaleBasePipe implements PipeTransform {
year: '2-digit',
hour: 'numeric',
minute: 'numeric',
hour12: true,
};
default:
return;
Expand Down

0 comments on commit f078b41

Please sign in to comment.